Running ‘testthat.R’ [0s/0s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(spant)
  spant 3.7.0
  
  Attaching package: 'spant'
  
  The following object is masked from 'package:stats':
  
      sd
  
  > 
  > test_check("spant")
  
   *** caught segfault ***
  address 0x2, cause 'invalid permissions'
  
  Traceback:
   1: eigen(H_mat_list$H_mat, symmetric = TRUE)
   2: spin_sys(spin_params, ft, ref)
   3: pul_seq(group, ft, ref, ...)
   4: sim_mol(mol_list[[n]], pul_seq, ft, ref, fs, N, xlim, ...)
   5: sim_basis(brain_basis_paras, pul_seq, acq_paras, xlim = xlim,     ...)
   6: sim_brain_1h(pul_seq = seq_press_ideal, full_output = TRUE, type = "normal_v1")
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  14: doWithOneRestart(return(expr), restart)
  15: withOneRestart(expr, restarts[[1L]])
  16: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  17: test_code(code, parent.frame())
  18: test_that("Test data stimulation step", {    sim_res <- sim_brain_1h(pul_seq = seq_press_ideal, full_output = TRUE,         type = "normal_v1")    expect_equal_to_reference(sim_res, "abfit_sim_res.rds", tolerance = 1e-06)    set.seed(1)    mrs_data <- add_noise(shift(phase(scale_mrs_amp(lb(sim_res$mrs_data,         6), 1/10), 130), 0.1), 0.001, fd = FALSE)    expect_equal_to_reference(mrs_data, "abfit_sim_mrs_data.rds",         tolerance = 1e-06)})
  19: eval(code, test_env)
  20: eval(code, test_env)
  21: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24: tryCatchList(expr, classes, parentenv, handlers)
  25: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  26: doWithOneRestart(return(expr), restart)
  27: withOneRestart(expr, restarts[[1L]])
  28: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  29: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  30: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  31: FUN(X[[i]], ...)
  32: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  37: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  38: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, shuffle = shuffle,     error_call = error_call)
  39: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = parallel, shuffle = shuffle)
  40: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  41: test_check("spant")
  An irrecoverable exception occurred. R is aborting now ...