tests/testthat/test-utils.R

context("utils.R unit tests")

# list depth -------------------------------------------------------------------
list1 <- list(1)
list2 <- list(1, list1)
list3 <- list(1, list1, list2)

expect_equal(list_depth(list1), 1)
expect_equal(list_depth(list2), 2)
expect_equal(list_depth(list3), 3)

Try the hesim package in your browser

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

hesim documentation built on Sept. 4, 2022, 1:06 a.m.