testrunner.rtlobjpas.pp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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,
  34. tests.rtti.value,
  35. tests.rtti.types,
  36. utmathvectorbase,
  37. utcmatrix,
  38. utcpoint,
  39. utcvector,
  40. utcquaternion;
  41. var
  42. Application: TTestRunner;
  43. begin
  44. DefaultFormat:=fPlain;
  45. DefaultRunAllTests:=True;
  46. Application := TTestRunner.Create(nil);
  47. Application.Initialize;
  48. Application.Title := 'RTL-ObjPas unit tests';
  49. Application.Run;
  50. Application.Free;
  51. end.