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.0.8.15 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.0.8.14 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.0.8.13 tracks/factor/exercises/leap/leap-tests.factor
trackler-2.0.8.12 tracks/factor/exercises/leap/leap-tests.factor