Sha256: 3bfe1120eae954dd3cf784ec860fa66f2b5c2ecca8bbd2120418f211b2ede913

Contents?: true

Size: 1.24 KB

Versions: 71

Compression:

Stored size: 1.24 KB

Contents

unit uLeapTests;

interface
uses
  DUnitX.TestFramework;

const
  CanonicalVersion = '1.3.0';

type

  [TestFixture]
  YearTest = class(TObject)
  public
    [Test]
//  [Ignore('Comment the "[Ignore]" statement to run the test')]
    procedure year_not_divisible_by_4_common_year;

    [Test]
    [Ignore]
    procedure year_divisible_by_4_not_divisible_by_100_leap_year;

    [Test]
    [Ignore]
    procedure year_divisible_by_100_not_divisible_by_400_common_year;

    [Test]
    [Ignore]
    procedure year_divisible_by_400_leap_year;
  end;

implementation
uses uLeap;

procedure YearTest.year_not_divisible_by_4_common_year;
begin
  assert.IsFalse(TYear.IsLeap(2015), 'Expected ''false'', 2015 is not a leap year.');
end;

procedure YearTest.year_divisible_by_4_not_divisible_by_100_leap_year;
begin
  assert.IsTrue(TYear.IsLeap(1996), 'Expected ''true'', 1996 is a leap year.');
end;

procedure YearTest.year_divisible_by_100_not_divisible_by_400_common_year;
begin
  assert.IsFalse(TYear.IsLeap(2100), 'Expected ''false'', 2100 is not a leap year.');
end;

procedure YearTest.year_divisible_by_400_leap_year;
begin
  assert.IsTrue(TYear.IsLeap(2000), 'Expected ''true'', 2000 is a leap year.');
end;

initialization
  TDUnitX.RegisterTestFixture(YearTest);
end.

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.179 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.178 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.177 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.176 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.175 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.174 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.173 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.172 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.171 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.170 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.169 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.167 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.166 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.165 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.164 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.163 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.162 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.161 tracks/delphi/exercises/leap/uLeapTests.pas
trackler-2.2.1.160 tracks/delphi/exercises/leap/uLeapTests.pas