Sha256: 25332fb9f39dc0311c33d7b9c59607d00f77c089d63bc989384fab4d4fc7098c

Contents?: true

Size: 722 Bytes

Versions: 396

Compression:

Stored size: 722 Bytes

Contents

#import <XCTest/XCTest.h>

#if __has_include("LeapExample.h")
# import "LeapExample.h"
# else
# import "Leap.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@interface LeapTest : XCTestCase

@end

@implementation LeapTest

- (void)testVanillaLeapYear {
  Leap *year = [[Leap alloc] initWithCalendarYear:@1996];
  XCTAssert(year.isLeapYear);
}

- (void)testAnyOldYear {
  Leap *year = [[Leap alloc] initWithCalendarYear:@1997];
  XCTAssertFalse(year.isLeapYear);
}

- (void)testCentury {
  Leap *year = [[Leap alloc] initWithCalendarYear:@1900];
  XCTAssertFalse(year.isLeapYear);
}

- (void)testExceptionalCentury {
  Leap *year = [[Leap alloc] initWithCalendarYear:@2400];
  XCTAssert(year.isLeapYear);
}

@end
NS_ASSUME_NONNULL_END

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.0.0.5 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.0.0.4 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.0.0.3 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.0.0.2 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.0.0.1 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.0.0.0 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.4.1 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.4.0 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.3.0 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.2.1 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.2.0 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.1.2 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.1.1 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.1.0 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.0.1 tracks/objective-c/exercises/leap/LeapTest.m
trackler-1.0.0 tracks/objective-c/exercises/leap/LeapTest.m