Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(reinforcelearn)
  > 
  > test_check("reinforcelearn")
  ── 1. Error: (unknown) (@test_accessor_functions.R#2)  ─────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: makeValueFunction("table", n.states = 8L, n.actions = 4L) at testthat/test_accessor_functions.R:2
  2: checkmate::assertChoice(class, c("table", "neural.network"))
  3: checkChoice(x, choices, null.ok, fmatch)
  4: qassert(null.ok, "B1")
  
  ── 2. Failure: softmax and epsilon greedy policies need value function (@test_ag
  `makeAgent("softmax")` threw an error with unexpected message.
  Expected match: "Cannot use this policy without specifying a value function!"
  Actual message: "LOGICAL() can only be applied to a 'logical', not a 'NULL'"
  
  
   *** caught segfault ***
  address 84a4a9a, cause 'memory not mapped'
  
  Traceback:
   1: qassert(null.ok, "B1")
   2: checkFunction(x, args, ordered, nargs, null.ok)
   3: checkmate::assertFunction(preprocess)
   4: makeAgent("greedy")
   5: eval_bare(get_expr(quo), get_env(quo))
   6: doTryCatch(return(expr), name, parentenv, handler)
   7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8: tryCatchList(expr, classes, parentenv, handlers)
   9: tryCatch({    code    NULL}, error = function(e) e)
  10: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  11: quasi_capture(enquo(object), capture_error, label = label)
  12: expect_error(makeAgent("greedy"), "Cannot use this policy without specifying a value function!")
  13: eval(code, test_env)
  14: eval(code, test_env)
  15: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  16: doTryCatch(return(expr), name, parentenv, handler)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  23: test_code(desc, code, env = parent.frame())
  24: test_that("softmax and epsilon greedy policies need value function",     {        expect_error(makeAgent("softmax"), "Cannot use this policy without specifying a value function!")        expect_error(makeAgent("greedy"), "Cannot use this policy without specifying a value function!")        expect_error(makeAgent("epsilon.greedy"), "Cannot use this policy without specifying a value function!")    })
  25: eval(code, test_env)
  26: eval(code, test_env)
  27: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  28: doTryCatch(return(expr), name, parentenv, handler)
  29: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  30: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  33: tryCatchList(expr, classes, parentenv, handlers)
  34: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  35: test_code(NULL, exprs, env)
  36: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  37: force(code)
  38: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  39: FUN(X[[i]], ...)
  40: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  41: force(code)
  42: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  44: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  45: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  46: test_check("reinforcelearn")
  An irrecoverable exception occurred. R is aborting now ...