Sha256: 522e0d4253d6db1b435615b035bcf0d5d55896ae9963d46bbcb0a183c19c67dc

Contents?: true

Size: 1.58 KB

Versions: 188

Compression:

Stored size: 1.58 KB

Contents

program Wordy;

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

188 entries across 188 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.118 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.117 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.116 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.115 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.114 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.113 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.111 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.110 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.109 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.108 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.107 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.106 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.105 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.104 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.103 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.102 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.101 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.100 tracks/delphi/exercises/wordy/Wordy.dpr
trackler-2.2.1.99 tracks/delphi/exercises/wordy/Wordy.dpr