Sha256: fed7d040901e80134a43fb8938a49d6844c8196f3401c753a48498abc19f60f0

Contents?: true

Size: 1.57 KB

Versions: 283

Compression:

Stored size: 1.57 KB

Contents

program Leap;

{$IFNDEF TESTINSIGHT}
{$APPTYPE CONSOLE}
{$ENDIF}{$STRONGLINKTYPES ON}
uses
  System.SysUtils,
  {$IFDEF TESTINSIGHT}
  TestInsight.DUnitX,
  {$ENDIF }
  DUnitX.Loggers.Console,
  DUnitX.Loggers.Xml.NUnit,
  DUnitX.TestFramework,
  uLeapTests in 'uLeapTests.pas',
  uLeap in 'uLeap.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 := True; //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.180 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.179 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.178 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.177 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.176 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.175 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.174 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.173 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.172 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.171 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.170 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.169 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.167 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.166 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.165 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.164 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.163 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.162 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.161 tracks/delphi/exercises/leap/Leap.dpr
trackler-2.2.1.160 tracks/delphi/exercises/leap/Leap.dpr