Sha256: bbc82a5ff844ed9ee7179aab725766b53bfb5254de6a45967bc31076cf9d4676

Contents?: true

Size: 1.59 KB

Versions: 35

Compression:

Stored size: 1.59 KB

Contents

program GrainsTests;

{$IFNDEF TESTINSIGHT}
{$APPTYPE CONSOLE}
{$ENDIF}{$STRONGLINKTYPES ON}
uses
  System.SysUtils,
  {$IFDEF TESTINSIGHT}
  TestInsight.DUnitX,
  {$ENDIF }
  DUnitX.Loggers.Console,
  DUnitX.Loggers.Xml.NUnit,
  DUnitX.TestFramework,
  uGrainsTests in 'uGrainsTests.pas',
  uGrains in 'uGrains.pas';

var
  runner : ITestRunner;
  results : IRunResults;
  logger : ITestLogger;
  nunitLogger : ITestLogger;
begin
{$IFDEF TESTINSIGHT}
  TestInsight.DUnitX.RunRegisteredTests;
  exit;
{$ENDIF}
  try
    //Check command line options, will exit if invalid
    TDUnitX.CheckCommandLine;
    //Create the test runner
    runner := TDUnitX.CreateRunner;
    //Tell the runner to use RTTI to find Fixtures
    runner.UseRTTI := True;
    //tell the runner how we will log things
    //Log to the console window
    logger := TDUnitXConsoleLogger.Create(true);
    runner.AddLogger(logger);
    //Generate an NUnit compatible XML File
    nunitLogger := TDUnitXXMLNUnitFileLogger.Create(TDUnitX.Options.XMLOutputFile);
    runner.AddLogger(nunitLogger);
    runner.FailsOnNoAsserts := False; //When true, Assertions must be made during tests;

    //Run tests
    results := runner.Execute;
    if not results.AllPassed then
      System.ExitCode := EXIT_ERRORS;

    {$IFNDEF CI}
    //We don't want this happening when running under CI.
    if TDUnitX.Options.ExitBehavior = TDUnitXExitBehavior.Pause then
    begin
      System.Write('Done.. press <Enter> key to quit.');
      System.Readln;
    end;
    {$ENDIF}
  except
    on E: Exception do
      System.Writeln(E.ClassName, ': ', E.Message);
  end;
end.

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
trackler-2.0.8.12 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.11 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.10 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.9 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.8 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.7 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.6 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.5 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.4 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.3 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.2 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.8.1 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.7.0 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.44 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.43 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.42 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.41 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.40 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.39 tracks/delphi/exercises/grains/GrainsTests.dpr
trackler-2.0.6.38 tracks/delphi/exercises/grains/GrainsTests.dpr