Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rjstat)
  > 
  > test_check("rjstat")
  ── 1. Error: dataset responses work (@test-classes.R#4)  ───────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'unknown type #30'
  1: fromJSONstat("dataset.json") %>% expect_s3_class("data.frame") %>% expect_named(c("A dimension", 
         "value")) %>% getElement("value") %>% expect_equal(1) at testthat/test-classes.R:4
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("dataset.json")
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 2. Error: collection responses work (@test-classes.R#12)  ───────────────────
  LOGICAL() can only be applied to a 'logical', not a 'unknown type #30'
  1: fromJSONstat("collection.json") %>% expect_type("list") %>% getElement(1) %>% expect_s3_class("data.frame") %>% 
         expect_named(c("A dimension", "value")) %>% getElement("value") %>% expect_equal(1) at testthat/test-classes.R:12
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("collection.json")
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 3. Error: column names are correct (@test-columns.R#4)  ─────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'unknown type #30'
  1: fromJSONstat("bundle.json", naming = "label") %>% getElement(1) %>% expect_named(c("A dimension with array index", 
         "A dimension with object index", "A dimension without index", "value")) at testthat/test-columns.R:4
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("bundle.json", naming = "label")
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 4. Error: columns are correct (@test-columns.R#25)  ─────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'unknown type #30'
  1: fromJSONstat("bundle.json", naming = "label") %>% getElement(1) %>% getElement(1) %>% 
         expect_equal(c("Category 11", "Category 11", "Category 11", "Category 12", "Category 12", 
             "Category 12")) at testthat/test-columns.R:25
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("bundle.json", naming = "label")
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 5. Error: column names are correct for missing labels (@test-columns.R#66)  ─
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: readLines("bundle.json")[-26] %>% fromJSONstat(naming = "label") %>% getElement(1) %>% 
         expect_named(c("testdimension1", "A dimension with object index", "A dimension without index", 
             "value")) at testthat/test-columns.R:66
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: fromJSONstat(., naming = "label")
  9: assert_choice(naming, c("label", "id"))
  10: checkChoice(x, choices, null.ok, fmatch)
  11: qassert(null.ok, "B1")
  
  ── 6. Error: columns are correct for missing labels (@test-columns.R#74)  ──────
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: readLines("bundle.json")[-33] %>% fromJSONstat(naming = "label") %>% getElement(1) %>% 
         getElement(1) %>% expect_equal(c("testcategory11", "testcategory11", "testcategory11", 
         "testcategory12", "testcategory12", "testcategory12")) at testthat/test-columns.R:74
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: fromJSONstat(., naming = "label")
  9: assert_choice(naming, c("label", "id"))
  10: checkChoice(x, choices, null.ok, fmatch)
  11: qassert(null.ok, "B1")
  
  ── 7. Error: dataset names are correct (@test-datasets.R#4)  ───────────────────
  LOGICAL() can only be applied to a 'logical', not a 'builtin'
  1: fromJSONstat("bundle.json", naming = "label") %>% expect_named(c("A dataset with array value", 
         "A dataset with object value")) at testthat/test-datasets.R:4
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("bundle.json", naming = "label")
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 8. Error: dataset names are correct for missing labels (@test-datasets.R#12) 
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: readLines("bundle.json")[-3] %>% fromJSONstat(naming = "label") %>% expect_named(c("dataset", 
         "A dataset with object value")) at testthat/test-datasets.R:12
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: fromJSONstat(., naming = "label")
  9: assert_choice(naming, c("label", "id"))
  10: checkChoice(x, choices, null.ok, fmatch)
  11: qassert(null.ok, "B1")
  
  ── 9. Error: factors are factors (@test-factors.R#4)  ──────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'builtin'
  1: fromJSONstat("bundle.json", naming = "label", use_factors = TRUE) %>% getElement(1) %>% 
         getElement(1) %>% expect_s3_class("factor") at testthat/test-factors.R:4
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("bundle.json", naming = "label", use_factors = TRUE)
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 10. Error: factor levels are correct (@test-factors.R#33)  ──────────────────
  LOGICAL() can only be applied to a 'logical', not a 'builtin'
  1: fromJSONstat("bundle.json", naming = "label", use_factors = TRUE) %>% getElement(1) %>% 
         getElement(1) %>% levels() %>% expect_equal(c("Category 11", "Category 12")) at testthat/test-factors.R:33
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("bundle.json", naming = "label", use_factors = TRUE)
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  ── 11. Error: factor integer codes are correct (@test-factors.R#68)  ───────────
  LOGICAL() can only be applied to a 'logical', not a 'builtin'
  1: fromJSONstat("bundle.json", use_factors = TRUE) %>% getElement(1) %>% getElement(1) %>% 
         unclass() %>% expect_equivalent(c(1, 1, 1, 2, 2, 2)) at testthat/test-factors.R:68
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: fromJSONstat("bundle.json", use_factors = TRUE)
  5: assert_choice(naming, c("label", "id"))
  6: checkChoice(x, choices, null.ok, fmatch)
  7: qassert(null.ok, "B1")
  
  
   *** caught segfault ***
  address 18b17761, cause 'memory not mapped'
  
  Traceback:
   1: qassert(null.ok, "B1")
   2: checkChoice(x, choices, null.ok, fmatch)
   3: assertChoice(combine, c("or", "and"))
   4: assert(checkDataFrame(x), checkList(x))
   5: unravel(x, value)
   6: toJSONstat(data.frame(value = 1, V1 = NA))
   7: eval_bare(get_expr(quo), get_env(quo))
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: tryCatch({    code    NULL}, error = function(e) e)
  12: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  13: quasi_capture(enquo(object), capture_error, label = label)
  14: expect_error(toJSONstat(data.frame(value = 1, V1 = NA)), "missing values")
  15: eval(code, test_env)
  16: eval(code, test_env)
  17: 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)
  18: doTryCatch(return(expr), name, parentenv, handler)
  19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  21: doTryCatch(return(expr), name, parentenv, handler)
  22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: 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) {    })
  25: test_code(desc, code, env = parent.frame())
  26: test_that("wrong input fails", {    expect_error(toJSONstat(data.frame(value = 1, V1 = NA)),         "missing values")    expect_error(toJSONstat(non_unique), "non-value columns must constitute a unique ID")})
  27: eval(code, test_env)
  28: eval(code, test_env)
  29: 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)
  30: doTryCatch(return(expr), name, parentenv, handler)
  31: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  32: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: 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) {    })
  37: test_code(NULL, exprs, env)
  38: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  39: force(code)
  40: 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()    })
  41: FUN(X[[i]], ...)
  42: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  43: force(code)
  44: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  45: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  46: 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)
  47: 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)
  48: test_check("rjstat")
  An irrecoverable exception occurred. R is aborting now ...