tests/testthat/test_initECRControl.R

context("generation of control object works fine")

test_that("general control object generator", {
  control = initECRControl(function(x) sum(x), minimize = FALSE, n.objectives = 5L)
  expect_class(control, "ecr_control")
  expect_class(control$task, "ecr_optimization_task")
})

Try the ecr package in your browser

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

ecr documentation built on March 31, 2023, 10:07 p.m.