testrunner.rtlobjpas.pp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. tests.rtti.util,
  28. {$ifdef testinvoke}
  29. tests.rtti.invoke,
  30. {$endif}
  31. {$ifdef testimpl}
  32. tests.rtti.impl,
  33. {$endif}
  34. tests.rtti,
  35. tests.rtti.value,
  36. tests.rtti.types,
  37. utmathvectorbase,
  38. utcmatrix,
  39. utcpoint,
  40. utcvector,
  41. utcquaternion;
  42. var
  43. Application: TTestRunner;
  44. begin
  45. DefaultFormat:=fPlain;
  46. DefaultRunAllTests:=True;
  47. Application := TTestRunner.Create(nil);
  48. Application.Initialize;
  49. Application.Title := 'RTL-ObjPas unit tests';
  50. Application.Run;
  51. Application.Free;
  52. end.