Sha256: 5811a329a2ea0425c4c0d0febbd320de60e1e9169ebe67f7dab2f3b9ded26dbc
Contents?: true
Size: 533 Bytes
Versions: 26
Compression:
Stored size: 533 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 for exercise: leap")
Version data entries
26 entries across 26 versions & 1 rubygems