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")
})
gauravsk3/odds documentation built on May 16, 2019, 6:39 p.m.