Running ‘testthat.R’ [68s/88s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ocp)
  > 
  > test_check("ocp")
  Saving _problems/test-ocpd-151.R
  Saving _problems/test-ocpd-151.R
  [ FAIL 2 | WARN 2 | SKIP 0 | PASS 5088 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-ocpd.R:142:7'): Data params: 1  list("g")list(list(m = 0, k = 0.01, a = 0.01, b = 1e-04))FALSE  Option params:  4  list(truncRlim = 0, minRlength = 1, maxRlength = 100, minsep = 1, maxsep = 500, hazard_func = function (x, lambda) 
  {
      const_hazard(x, lambda = 100)
  }) ──
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
      ▆
   1. └─testthat::capture_output(...) at test-ocpd.R:142:7
   2.   └─testthat::capture_output_lines(code, print, width = width)
   3.     └─testthat:::eval_with_output(code, print = print, width = width)
   4.       └─withr::with_output_sink(path, withVisible(code))
   5.         └─withr:::set_output_sink(file = new, append = append, split = split)
   6.           └─withr:::output_sink(file = file, append = append, split = split)
   7.             └─base::sink(file = file, append = append, type = "output", split = split)
   8.               └─base::file(file, if (append) "a" else "w")
  ── Error ('test-ocpd.R:142:7'): Data params: 5  list("p", "p", "p", "g", "g", "g")list(list(a = 1, b = 1), list(a = 1, b = 1), list(a = 1, b = 1), list(m = 0, k = 0.01, a = 0.01, b = 1e-04), list(m = 0, k = 0.01, a = 0.01, b = 1e-04), list(m = 0, k = 0.01, a = 0.01, b = 1e-04))TRUE  Option params:  7  list(truncRlim = 0.01, minRlength = 10, maxRlength = 100, minsep = 1, maxsep = 50, hazard_func = function (x, lambda) 
  {
      const_hazard(x, lambda = 100)
  }) ──
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
      ▆
   1. └─testthat::capture_output(...) at test-ocpd.R:142:7
   2.   └─testthat::capture_output_lines(code, print, width = width)
   3.     └─testthat:::eval_with_output(code, print = print, width = width)
   4.       └─withr::with_output_sink(path, withVisible(code))
   5.         └─withr:::set_output_sink(file = new, append = append, split = split)
   6.           └─withr:::output_sink(file = file, append = append, split = split)
   7.             └─base::sink(file = file, append = append, type = "output", split = split)
   8.               └─base::file(file, if (append) "a" else "w")
  
  [ FAIL 2 | WARN 2 | SKIP 0 | PASS 5088 ]
  Error:
  ! Test failures.
  Execution halted