tests/testthat/test-odds.R

library(odds)

context("Conversions")

test_that("converting fractional -> decimal", {
  expect_equal(to.decimal("1/2"), 1.5)

})

test_that("converting decimal -> fractional", {
  expect_equal(to.fractional(1.5), "1/2")

})
dhandoko5/odds documentation built on May 15, 2019, 8:21 a.m.