inst/tinytest/test_example_tests.R

# --------------------------------------------------------------------
# EXAMPLES FOR TESTING WITH TINYTEST
# --------------------------------------------------------------------

# --------------------------------------------------------------------
# Run some sample tests
# --------------------------------------------------------------------
expect_equal(1 + 1, 2)          # TRUE
expect_equivalent(2, c(x = 2))  # TRUE


# --------------------------------------------------------------------
# Run some sample tests only at home, where env variable TT_AT_HOME=TRUE
# --------------------------------------------------------------------
if (at_home()){
  expect_silent(1 + 1)          # TRUE
  expect_silent(print("hihi"))  # TRUE, nothing goes to screen
}

Try the topmodels package in your browser

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

topmodels documentation built on Sept. 10, 2022, 3 p.m.