testrunner.rtlobjpas.pp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. {$ifdef linux}
  7. {$define useffi}
  8. {$endif}
  9. {$if defined(CPUX64) and defined(WINDOWS)}
  10. {$define testinvoke}
  11. {$define testimpl}
  12. {$elseif defined(CPUI386)}
  13. {$define testinvoke}
  14. {$define testimpl}
  15. {$else}
  16. {$ifdef useffi}
  17. {$define testinvoke}
  18. {$define testimpl}
  19. {$endif}
  20. {$endif}
  21. {$IF DEFINED(WINDOWS) or DEFINED(UNIX)}
  22. {$DEFINE HAS_MONITOR}
  23. {$ENDIF}
  24. uses
  25. {$ifdef unix}
  26. cthreads,
  27. cwstring,
  28. {$endif}
  29. {$ifdef useffi}
  30. ffi.manager,
  31. {$endif}
  32. consoletestrunner,
  33. tests.rtti.util,
  34. {$ifdef testinvoke}
  35. tests.rtti.invoke,
  36. {$endif}
  37. {$ifdef testimpl}
  38. tests.rtti.impl,
  39. {$endif}
  40. tests.rtti,
  41. tests.rtti.value,
  42. tests.rtti.types,
  43. utmathvectorbase,
  44. utcmatrix,
  45. utcpoint,
  46. utcvector,
  47. utcquaternion,
  48. {$IFDEF HAS_MONITOR}
  49. utcfpmonitor, tests.rtti.attrtypes
  50. {$ENDIF}
  51. ;
  52. var
  53. Application: TTestRunner;
  54. begin
  55. DefaultFormat:=fPlain;
  56. DefaultRunAllTests:=True;
  57. Application := TTestRunner.Create(nil);
  58. Application.Initialize;
  59. Application.Title := 'RTL-ObjPas unit tests';
  60. Application.Run;
  61. Application.Free;
  62. end.