Sha256: 7b732edca95ca41d5ceae476b3572af2468236384fd089f1f413b2ea952d32ac

Contents?: true

Size: 753 Bytes

Versions: 284

Compression:

Stored size: 753 Bytes

Contents

USING: io leap tools.test ;
IN: leap.tests

"Leap year:" print

"not very common" print
{ f } [ 2015 my-leap-year? ] unit-test

"introduced every 4 years to adjust about a day" print
{ t } [ 2016 my-leap-year? ] unit-test

"skipped every 100 years to remove an extra day" print
{ f } [ 1900 my-leap-year? ] unit-test

"reintroduced every 400 years to adjust yet another day" print
{ t } [ 2000 my-leap-year? ] unit-test



"Additional corner cases of leap years:" print

"not a leap year" print
{ f } [ 1978 my-leap-year? ] unit-test

"a common leap year" print
{ t } [ 1992 my-leap-year? ] unit-test

"is skipped every 100 years" print
{ f } [ 2100 my-leap-year? ] unit-test

"reintroduced every 400 years" print
{ f } [ 2100 my-leap-year? ] unit-test

Version data entries

284 entries across 284 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.138 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.137 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.136 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.135 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.134 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.133 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.132 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.131 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.130 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.129 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.128 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.127 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.126 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.125 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.124 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.123 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.122 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.121 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.2.1.120 tracks/factor/exercises/leap/leap-tests.factor