testrunner.rtlobjpas.pp 966 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 unix}
  21. cwstring,
  22. {$endif}
  23. {$ifdef useffi}
  24. ffi.manager,
  25. {$endif}
  26. consoletestrunner,
  27. {$ifdef testinvoke}
  28. tests.rtti.invoke,
  29. {$endif}
  30. {$ifdef testimpl}
  31. tests.rtti.impl,
  32. {$endif}
  33. tests.rtti, tests.rtti.value, tests.rtti.types;
  34. var
  35. Application: TTestRunner;
  36. begin
  37. DefaultFormat:=fPlain;
  38. DefaultRunAllTests:=True;
  39. Application := TTestRunner.Create(nil);
  40. Application.Initialize;
  41. Application.Title := 'RTL-ObjPas unit tests';
  42. Application.Run;
  43. Application.Free;
  44. end.