tests/testthat/tests-class-targets.R

test_that("class_targets", {
  cls_1 <- flsgen_create_class_targets("class 1", NP=c(1, 10), AREA=c(1, 1000), MESH=c(200, 200))
  testthat::expect_equal(class(cls_1), "FlsgenClassTargets")
  testthat::expect_equal(cls_1$NP, c(1, 10))
  testthat::expect_equal(cls_1$AREA, c(1, 1000))
  testthat::expect_equal(cls_1$MESH, c(200, 200))
  testthat::expect_error(class_targets("cls", NP="what?"))
})

Try the rflsgen package in your browser

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

rflsgen documentation built on July 4, 2024, 1:10 a.m.