Sha256: 50fa658e3eb9efa8a3c6dd759d49944d11ada573a5042c3aac6bc36ca581d994

Contents?: true

Size: 1.62 KB

Versions: 104

Compression:

Stored size: 1.62 KB

Contents

program SecretHandshake;

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

104 entries across 104 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.97 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.96 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.95 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.94 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.93 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.92 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.91 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.90 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.89 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.88 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.87 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.86 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.85 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.84 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.83 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.82 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.81 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.80 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr
trackler-2.2.1.79 tracks/delphi/exercises/secret-handshake/SecretHandshake.dpr