Sha256: 9238d75b34581fc709a303b0c3b5989b44aafbbd1ace66e5ea30c077fefc9be6
Contents?: true
Size: 535 Bytes
Versions: 140
Compression:
Stored size: 535 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) }) message("All tests passed for exercise: leap")
Version data entries
140 entries across 140 versions & 1 rubygems