unittests_console.lpr 481 B

123456789101112131415161718192021222324252627282930
  1. program unittests_console;
  2. {$mode objfpc}{$H+}
  3. uses
  4. Classes
  5. ,consoletestrunner
  6. {$i testunits.inc}
  7. ;
  8. type
  9. { TLazTestRunner }
  10. TMyTestRunner = class(TTestRunner)
  11. protected
  12. // override the protected methods of TTestRunner to customize its behavior
  13. end;
  14. var
  15. Application: TMyTestRunner;
  16. begin
  17. DefaultFormat:=fPlain;
  18. DefaultRunAllTests:=True;
  19. Application := TMyTestRunner.Create(nil);
  20. Application.Initialize;
  21. Application.Run;
  22. Application.Free;
  23. end.