Sha256: bb85c0e5b5264f2eb6c512a84f8497207fb53f89e0851389b7fdce1f5b6eb9b3

Contents?: true

Size: 1.59 KB

Versions: 283

Compression:

Stored size: 1.59 KB

Contents

program Raindrops;

{$IFNDEF TESTINSIGHT}
{$APPTYPE CONSOLE}
{$ENDIF}{$STRONGLINKTYPES ON}
uses
  System.SysUtils,
  {$IFDEF TESTINSIGHT}
  TestInsight.DUnitX,
  {$ENDIF }
  DUnitX.Loggers.Console,
  DUnitX.Loggers.Xml.NUnit,
  DUnitX.TestFramework,
  uRaindropsTest in 'uRaindropsTest.pas',
  uRaindrops in 'uRaindrops.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

283 entries across 283 versions & 1 rubygems

Version Path
trackler-2.2.1.78 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.77 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.76 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.75 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.74 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.73 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.72 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.71 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.70 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.69 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.68 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.67 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.66 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.65 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.64 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.63 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.62 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.61 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.60 tracks/delphi/exercises/raindrops/raindrops.dpr
trackler-2.2.1.59 tracks/delphi/exercises/raindrops/raindrops.dpr