testrunner.rtlobjpas.pp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 wasi}
  30. unicodeducet, fpwidestring,
  31. {$endif}
  32. {$ifdef useffi}
  33. ffi.manager,
  34. {$endif}
  35. consoletestrunner,
  36. {$ifdef testinvoke}
  37. tests.rtti.invoke,
  38. {$endif}
  39. {$ifdef testimpl}
  40. tests.rtti.impl,
  41. {$endif}
  42. tests.rtti,
  43. tests.rtti.util,
  44. tests.rtti.value,
  45. tests.rtti.types,
  46. tests.rtti.attrtypes,
  47. tests.rtti.impltypes,
  48. tests.rtti.invoketypes,
  49. utmathvectorbase,
  50. utcmatrix,
  51. utcpoint,
  52. utcvector,
  53. utcquaternion,
  54. {$IFDEF HAS_MONITOR}
  55. utcfpmonitor, tests.rtti.attrtypes2,
  56. {$ENDIF}
  57. utcStrUtils
  58. ;
  59. var
  60. Application: TTestRunner;
  61. begin
  62. DefaultFormat:=fPlain;
  63. DefaultRunAllTests:=True;
  64. Application := TTestRunner.Create(nil);
  65. Application.Initialize;
  66. Application.Title := 'RTL-ObjPas unit tests';
  67. Application.Run;
  68. Application.Free;
  69. end.