unittests_console.lpr 520 B

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