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.2.1.180 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.179 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.178 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.177 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.176 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.175 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.174 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.173 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.172 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.171 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.170 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.169 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.167 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.166 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.165 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.164 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.163 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.162 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.161 tracks/objective-c/exercises/leap/LeapTest.m
trackler-2.2.1.160 tracks/objective-c/exercises/leap/LeapTest.m