Sha256: 30786b1480776b135f259bc6a20bf09d1fd07ee0afeae6fe4dc1efd3103ba38b
Contents?: true
Size: 515 Bytes
Versions: 38
Compression:
Stored size: 515 Bytes
Contents
source('./leap.R') library(testthat) test_that("year not divisible by 4: common year", { year <- 2015 expect_equal(leap(year), FALSE) }) test_that("year divisible by 4, not divisible by 100: leap year", { year <- 2016 expect_equal(leap(year), TRUE) }) test_that("year divisible by 100, not divisible by 400: common year", { year <- 2100 expect_equal(leap(year), FALSE) }) test_that("year divisible by 400: leap year", { year <- 2000 expect_equal(leap(year), TRUE) }) print("All tests passed!")
Version data entries
38 entries across 38 versions & 1 rubygems