Running ‘testthat.R’ [7s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(fastplyr)
  > 
  > test_check("fastplyr")
  
   *** caught segfault ***
  address 0x1, cause 'memory not mapped'
  
  Traceback:
   1: cpp_sorted_group_starts(as.integer(group_sizes), init_loc)
   2: sorted_group_starts(GRP_sizes)
   3: GRP_starts(out)
   4: GRP3(data2, sort = order, return.order = return.order, return.groups = return.groups,     call = FALSE)
   5: df_to_GRP(data_transformed, .cols = all_vars, return.order = FALSE,     order = order, return.groups = TRUE)
   6: f_count(., Species)
   7: iris %>% dplyr::slice(0) %>% f_count(Species)
   8: eval_bare(expr, quo_get_env(quo))
   9: quasi_label(enquo(expected), expected.label, arg = "expected")
  10: expect_equal(iris %>% dplyr::slice(0) %>% dplyr::count(Species),     iris %>% dplyr::slice(0) %>% f_count(Species))
  11: eval(code, test_env)
  12: eval(code, test_env)
  13: 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)
  14: doTryCatch(return(expr), name, parentenv, handler)
  15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  17: doTryCatch(return(expr), name, parentenv, handler)
  18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  19: tryCatchList(expr, classes, parentenv, handlers)
  20: 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) {    })
  21: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  22: test_that("Compare to dplyr", {    set.seed(42)    weights <- sample(1:150)    iris[["weight"]] <- weights    flights <- nycflights13::flights    expect_equal(iris %>% dplyr::count(), iris %>% f_count())    expect_identical(iris %>% collapse::qDT() %>% f_count(),         collapse::qDT(new_df(n = 150L)))    expect_identical(iris %>% collapse::qDT() %>% dplyr::slice(0L) %>%         f_count(), collapse::qDT(new_df(n = 0L)))    expect_equal(iris %>% dplyr::slice(2, 128, 125) %>% dplyr::group_by(Species,         .drop = FALSE) %>% f_count(), iris %>% dplyr::slice(2,         128, 125) %>% dplyr::group_by(Species, .drop = FALSE) %>%         dplyr::count())    expect_equal(iris %>% dplyr::slice(2, 128, 125) %>% dplyr::group_by(Species,         .drop = TRUE) %>% f_count(), iris %>% dplyr::slice(2,         128, 125) %>% dplyr::group_by(Species, .drop = TRUE) %>%         dplyr::count())    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(across(all_of("Species"))),         iris %>% dplyr::group_by(Species) %>% f_count())    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(across(all_of(c("Species",         "Sepal.Length")))), iris %>% dplyr::group_by(Species) %>%         f_count(across(all_of(c("Sepal.Length")))))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(Species),         iris %>% dplyr::group_by(Species) %>% f_count(Species))    expect_equal(iris %>% dplyr::count(NULL), iris %>% f_count(NULL))    expect_equal(iris %>% dplyr::slice(0) %>% dplyr::count(),         iris %>% dplyr::slice(0) %>% f_count())    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::slice(0) %>%         dplyr::count(), iris %>% dplyr::group_by(Species) %>%         dplyr::slice(0) %>% f_count())    expect_equal(iris %>% dplyr::slice(0) %>% dplyr::count(Species),         iris %>% dplyr::slice(0) %>% f_count(Species))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::slice(0) %>%         dplyr::count(Species), iris %>% dplyr::group_by(Species) %>%         dplyr::slice(0) %>% f_count(Species))    expect_equal(iris %>% dplyr::count(NA), iris %>% f_count(NA))    expect_equal(iris %>% dplyr::count(across(dplyr::everything())),         iris %>% f_count(across(dplyr::everything())))    expect_equal(iris %>% dplyr::count(across(dplyr::everything()),         wt = weight), iris %>% f_count(across(dplyr::everything()),         wt = weight) %>% dplyr::mutate(n = as.integer(n)))    expect_equal(iris %>% dplyr::count(), iris %>% f_count())    expect_equal(iris %>% dplyr::count(name = ".count"), iris %>%         f_count(name = ".count"))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(Sepal.Length) %>%         dplyr::count(n, name = "n"), iris %>% dplyr::group_by(Species) %>%         f_count(Sepal.Length) %>% f_count(n, name = "n"))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(),         iris %>% dplyr::group_by(Species) %>% f_count())    expect_equal(iris %>% dplyr::group_by(across(everything())) %>%         dplyr::count(), iris %>% dplyr::group_by(across(everything())) %>%         f_count())    expect_equal(iris %>% dplyr::group_by(across(everything())) %>%         dplyr::count(Species), iris %>% dplyr::group_by(across(everything())) %>%         f_count(Species))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(Species),         iris %>% dplyr::group_by(Species) %>% f_count(Species))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(across(all_of(c("Sepal.Length")))),         iris %>% dplyr::group_by(Species) %>% f_count(across(all_of(c("Sepal.Length")))))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(across(dplyr::any_of(c("Species",         "Sepal.Length")))), iris %>% dplyr::group_by(Species) %>%         f_count(across(dplyr::any_of(c("Species", "Sepal.Length")))))    expect_equal(iris %>% dplyr::count(as.character(Species)),         iris %>% f_count(as.character(Species)))    expect_equal(flights %>% dplyr::count(tailnum, origin, dest),         flights %>% f_count(tailnum, origin, dest))    expect_equal(flights %>% dplyr::count(tailnum, origin, dest,         sort = TRUE), flights %>% f_count(tailnum, origin, dest,         sort = TRUE))    res1 <- flights %>% f_count(origin, dest)    set.seed(812123123)    wt1 <- rep_len(3L, nrow(res1))    wt2 <- sample(1:10, size = nrow(res1), replace = TRUE)    res1 <- res1 %>% dplyr::mutate(wt2)    expect_equal(res1 %>% dplyr::count(origin, dest, wt = wt2),         res1 %>% f_count(origin, dest, wt = wt2))    expect_equal(res1 %>% dplyr::mutate(wt1) %>% dplyr::count(origin,         dest, wt = wt1), res1 %>% f_count(origin, dest, wt = wt1))    expect_equal(res1 %>% dplyr::count(origin, dest, n, wt = wt2),         res1 %>% f_count(origin, dest, n, wt = wt2))    expect_equal(res1 %>% dplyr::count(origin, dest, wt = n),         res1 %>% f_count(origin, dest, wt = n))    expect_equal(iris %>% dplyr::group_by(Species) %>% dplyr::count(Species = Sepal.Length),         iris %>% dplyr::group_by(Species) %>% f_count(Species = Sepal.Length))})
  23: eval(code, test_env)
  24: eval(code, test_env)
  25: 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)
  26: doTryCatch(return(expr), name, parentenv, handler)
  27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  29: doTryCatch(return(expr), name, parentenv, handler)
  30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  31: tryCatchList(expr, classes, parentenv, handlers)
  32: 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) {    })
  33: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  34: source_file(path, env = env(env), desc = desc, error_call = error_call)
  35: FUN(X[[i]], ...)
  36: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  37: doTryCatch(return(expr), name, parentenv, handler)
  38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  39: tryCatchList(expr, classes, parentenv, handlers)
  40: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  41: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  42: 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, error_call = error_call)
  43: 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)
  44: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  45: test_check("fastplyr")
  An irrecoverable exception occurred. R is aborting now ...