tests/testthat/test_utilities.R

context("Utilities")
library(nvctr)

test_that("normalization", {
  expect_equal(unit(c(1, 0, 0)), c(1, 0, 0))

  expect_equal(unit(c(0, 0, 0)), c(1, 0, 0))
})

Try the nvctr package in your browser

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

nvctr documentation built on Oct. 28, 2020, 5:07 p.m.