Sha256: 47667138bd4096afb96300feb461fbea02d6a619e2f0c18863f72ec8168a77f8
Contents?: true
Size: 551 Bytes
Versions: 50
Compression:
Stored size: 551 Bytes
Contents
source('./leap.R') suppressPackageStartupMessages({ require(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
50 entries across 50 versions & 1 rubygems