inst/tinytest/test_golden_ratio.R

if (interactive()) {
  pkgload::load_all()
  library("tinytest")
}


gr <- ((1 + sqrt(5)) / 2)
expectation <- list(a = 1, b = gr - 1)
result <- golden_ratio(gr)
expect_identical(result, expectation)

Try the fritools2 package in your browser

Any scripts or data that you put into this service are public.

fritools2 documentation built on July 9, 2023, 7:07 p.m.