tests/testthat/test-ulam_spiral.R

test_that("ulam_spiral works without errors", {
    expect_error(ulam_spiral(15), NA)  # odd side length
    expect_error(ulam_spiral(16), NA)  # even side length
})
BastiHz/numberphile documentation built on Oct. 12, 2020, 6:03 p.m.