testrunner.rtlobjpas.pp 925 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. { %CONFIGFILE=fpcunit-console-defaults.ini testdefaults.ini }
  2. { %SKIPTARGET=embedded,nativent,msdos,win16,macos,palmos }
  3. program testrunner.rtlobjpas;
  4. {$mode objfpc}{$H+}
  5. { Invoke needs a function call manager }
  6. {.$define useffi}
  7. {$if defined(CPUX64) and defined(WINDOWS)}
  8. {$define testinvoke}
  9. {$define testimpl}
  10. {$elseif defined(CPUI386)}
  11. {$define testinvoke}
  12. {$define testimpl}
  13. {$else}
  14. {$ifdef useffi}
  15. {$define testinvoke}
  16. {$define testimpl}
  17. {$endif}
  18. {$endif}
  19. uses
  20. {$ifdef useffi}
  21. ffi.manager,
  22. {$endif}
  23. consoletestrunner,
  24. {$ifdef testinvoke}
  25. tests.rtti.invoke,
  26. {$endif}
  27. {$ifdef testimpl}
  28. tests.rtti.impl,
  29. {$endif}
  30. tests.rtti, tests.value, tests.rtti.types;
  31. var
  32. Application: TTestRunner;
  33. begin
  34. DefaultFormat:=fPlain;
  35. DefaultRunAllTests:=True;
  36. Application := TTestRunner.Create(nil);
  37. Application.Initialize;
  38. Application.Title := 'RTL-ObjPas unit tests';
  39. Application.Run;
  40. Application.Free;
  41. end.