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