Running 'spelling.R' [0s]
  Running 'testthat.R' [139s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(evaluator)
  > 
  > # ensure phantom.js is available on CI platforms
  > if (Sys.getenv("NOT_CRAN", "") != "" || Sys.getenv("CI", "") != "") {
  +   if (!shinytest::dependenciesInstalled()) shinytest:::installDependencies()
  +   message("Using phantom.js from ", shinytest:::find_phantom(), "\n")
  + }
  > 
  > test_check("evaluator")
  # Scenario model: openfair_tef_tc_diff_lm
  == Skipped tests ===============================================================
  * Not running MVA test - EVALUATOR_TEST_MVA not set (1)
  * On CRAN (1)
  * Shiny testing is awkward, consider moving to stand along pkg (1)
  * empty test (1)
  
  == Failed tests ================================================================
  -- Failure (test-openfair.R:12:3): Sample TEF ----------------------------------
  length(tef$samples) not equal to 10.
  1/1 mismatches
  [1] 1 - 10 == -9
  -- Failure (test-openfair.R:16:3): Sample TEF ----------------------------------
  unlist(tef$samples) not equal to c(7, 30, 2, 34, 36, 13, 14, 14, 9, 15).
  Lengths differ: 1 is not 10
  -- Failure (test-openfair.R:28:3): Sample DIFF ---------------------------------
  length(dat$samples) not equal to 10.
  1/1 mismatches
  [1] 1 - 10 == -9
  -- Failure (test-openfair.R:30:3): Sample DIFF ---------------------------------
  signif(unlist(dat$samples), digits = 4) not equal to signif(...).
  Lengths differ: 1 is not 10
  -- Failure (test-openfair.R:48:3): Multi control diff works --------------------
  length(map(dat, "samples") %>% purrr::as_vector()) not equal to 20.
  1/1 mismatches
  [1] 2 - 20 == -18
  -- Failure (test-openfair.R:50:3): Multi control diff works --------------------
  signif(map(dat, "samples") %>% purrr::as_vector(), digits = 4) not equal to signif(...).
  Lengths differ: 2 is not 20
  -- Failure (test-openfair.R:69:3): Sample TC -----------------------------------
  length(tc$samples) not equal to 10.
  1/1 mismatches
  [1] 1 - 10 == -9
  -- Failure (test-openfair.R:71:3): Sample TC -----------------------------------
  signif(unlist(tc$samples), digits = 4) not equal to signif(...).
  Lengths differ: 1 is not 10
  -- Failure (test-openfair.R:109:3): Sample VULN works with TC and DIFF ---------
  length(dat$samples) not equivalent to 10.
  1/1 mismatches
  [1] 1 - 10 == -9
  -- Failure (test-openfair.R:111:3): Sample VULN works with TC and DIFF ---------
  sum(dat$samples) not equivalent to 5.
  1/1 mismatches
  [1] 1 - 5 == -4
  -- Failure (test-openfair.R:113:3): Sample VULN works with TC and DIFF ---------
  floor(dat$details$mean_tc_exceedance) not equivalent to 7.
  1/1 mismatches
  [1] 5 - 7 == -2
  -- Failure (test-openfair.R:115:3): Sample VULN works with TC and DIFF ---------
  floor(dat$details$mean_diff_exceedance) not equivalent to 8.
  1/1 mismatches
  [1] 0 - 8 == -8
  -- Failure (test-openfair.R:138:3): Sample LM ----------------------------------
  length(lm$samples) not equal to 10.
  1/1 mismatches
  [1] 1 - 10 == -9
  -- Failure (test-openfair.R:140:3): Sample LM ----------------------------------
  signif(unlist(lm$samples), digits = 4) not equal to signif(...).
  Lengths differ: 1 is not 10
  -- Failure (test-openfair.R:177:3): Sample LEF works with composition function --
  dat$samples not equal to c(5, 11, 15, 2, 12, 0, 8, 0, 0, 6).
  6/10 mismatches (average diff: 5)
  [2]  5 - 11 ==  -6
  [3]  5 - 15 == -10
  [4]  5 -  2 ==   3
  [5]  5 - 12 ==  -7
  [7]  5 -  8 ==  -3
  [10] 5 -  6 ==  -1
  -- Error (test-openfair.R:189:3): Default simulation model returns expected results --
  Error: Errors encountered with scenarios:
  list(tef = list(func = "mc2d::rpert", min = 1, mode = 10, max = 100, shape = 4), tc = list(func = "mc2d::rpert", min = 1, mode = 10, max = 75, shape = 100), lm = list(func = "mc2d::rpert", min = 1, mode = 100, max = 10000, shape = 54), diff = list(list(func = "mc2d::rpert", min = 1, mode = 10, max = 50, shape = 4)))openfair_tef_tc_diff_lmError: Error in TEFsamples[[x]]: subscript out of bounds
  
  Backtrace:
      x
   1. \-evaluator::run_simulation(scen, iterations = 100) test-openfair.R:189:2
  -- Error (test-openfair.R:220:3): SR model works as expected -------------------
  Error: Errors encountered with scenarios:
  list(tef = list(func = "mc2d::rpert", min = 10, mode = 24, max = 52, shape = 4), tc = list(func = "mc2d::rpert", min = 33, mode = 50, max = 60, shape = 3), diff = list(list(func = "mc2d::rpert", min = 70, mode = 85, max = 98, shape = 4), list(func = "mc2d::rpert", min = 50, mode = 70, max = 84, shape = 4), list(func = "mc2d::rpert", min = 0, mode = 10, max = 30, shape = 4), list(func = "mc2d::rpert", min = 50, mode = 70, max = 84, shape = 4), list(func = "mc2d::rpert", min = 20, mode = 30, max = 50, 
      shape = 4), list(func = "mc2d::rpert", min = 20, mode = 30, max = 50, shape = 4), list(func = "mc2d::rpert", min = 50, mode = 70, max = 84, shape = 4)), plm = list(func = "mc2d::rpert", min = 10000, mode = 20000, max = 500000, shape = 4), sr = list(func = "mc2d::rpert", min = 10000, mode = 20000, max = 500000, shape = 4))openfair_tef_tc_diff_plm_srError: Error in TEFsamples[[x]]: subscript out of bounds
  
  Backtrace:
      x
   1. +-scenario$scenario %>% map_df(run_simulation, 100L) test-openfair.R:220:2
   2. \-purrr::map_df(., run_simulation, 100L)
   3.   \-purrr::map(.x, .f, ...)
   4.     \-evaluator:::.f(.x[[i]], ...)
  -- Error (test-simulate.R:21:3): Simulation respects maximum ALE ---------------
  Error: Errors encountered with scenarios:
  list(tef = list(min = 10, mode = 24, max = 52, shape = 4, func = "mc2d::rpert"), tc = list(min = 0.33, mode = 0.5, max = 0.6, shape = 3, func = "mc2d::rpert"), diff = list(`CAP-01` = list(min = 0.7, mode = 0.85, max = 0.98, shape = 4, func = "mc2d::rpert"), `CAP-05` = list(min = 0.5, mode = 0.7, max = 0.84, shape = 4, func = "mc2d::rpert"), `CAP-07` = list(min = 0, mode = 0.1, max = 0.3, shape = 4, func = "mc2d::rpert"), `CAP-14` = list(min = 0.5, mode = 0.7, max = 0.84, shape = 4, func = "mc2d::rpert"), 
      `CAP-15` = list(min = 0.2, mode = 0.3, max = 0.5, shape = 4, func = "mc2d::rpert"), `CAP-16` = list(min = 0.2, mode = 0.3, max = 0.5, shape = 4, func = "mc2d::rpert"), `CAP-32` = list(min = 0.5, mode = 0.7, max = 0.84, shape = 4, func = "mc2d::rpert")), lm = list(min = 10000, mode = 20000, max = 5e+05, shape = 4, func = "mc2d::rpert"))openfair_tef_tc_diff_lmError: Error in TEFsamples[[x]]: subscript out of bounds
  
  Backtrace:
      x
   1. \-evaluator::run_simulation(good_scen, 10L, ale_maximum = 100) test-simulate.R:21:2
  -- Error (test-simulate.R:42:3): Simulating multiple scenarios succeeds --------
  Error: Errors encountered with scenarios:
  list(tef = list(min = 10, mode = 24, max = 52, shape = 4, func = "mc2d::rpert"), tc = list(min = 0.33, mode = 0.5, max = 0.6, shape = 3, func = "mc2d::rpert"), diff = list(`CAP-01` = list(min = 0.7, mode = 0.85, max = 0.98, shape = 4, func = "mc2d::rpert"), `CAP-05` = list(min = 0.5, mode = 0.7, max = 0.84, shape = 4, func = "mc2d::rpert"), `CAP-07` = list(min = 0, mode = 0.1, max = 0.3, shape = 4, func = "mc2d::rpert"), `CAP-14` = list(min = 0.5, mode = 0.7, max = 0.84, shape = 4, func = "mc2d::rpert"), 
      `CAP-15` = list(min = 0.2, mode = 0.3, max = 0.5, shape = 4, func = "mc2d::rpert"), `CAP-16` = list(min = 0.2, mode = 0.3, max = 0.5, shape = 4, func = "mc2d::rpert"), `CAP-32` = list(min = 0.5, mode = 0.7, max = 0.84, shape = 4, func = "mc2d::rpert")), lm = list(min = 10000, mode = 20000, max = 5e+05, shape = 4, func = "mc2d::rpert"))openfair_tef_tc_diff_lmError: Error in TEFsamples[[x]]: subscript out of bounds
  
  Backtrace:
      x
   1. \-evaluator::run_simulations(...) test-simulate.R:42:2
   2.   \-purrr::map(...)
   3.     \-evaluator:::.f(.x[[i]], ...)
  
  [ FAIL 19 | WARN 1 | SKIP 4 | PASS 111 ]
  Error: Test failures
  Execution halted