diff --git a/DESCRIPTION b/DESCRIPTION index 0e902f8..b079b96 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: atime Type: Package Title: Asymptotic Timing -Version: 2024.10.3 +Version: 2024.10.5 Authors@R: c( person("Toby", "Hocking", email="toby.hocking@r-project.org", diff --git a/NEWS b/NEWS index 2f11bc5..9696449 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Changes in version 2024.10.5 + +- bugfix: atime_test again outputs historical versions which were specified in ... + Changes in version 2024.10.3 - atime_pkg generates files such as _test_name_.png with underscores instead of special characters such as > which are not supported on some file systems, including github actions (https://github.com/tdhock/atime/issues/62). diff --git a/R/test.R b/R/test.R index e398bcb..65dbca2 100644 --- a/R/test.R +++ b/R/test.R @@ -285,7 +285,7 @@ get_test_args <- function(){ } atime_test <- function(N, setup, expr, times, seconds.limit, verbose, pkg.edit.fun, result, ...){ - get_test_args() + c(get_test_args(), ...) } atime_test_list <- function(N, setup, expr, times, seconds.limit, verbose, pkg.edit.fun, result, tests=NULL, ...){ diff --git a/tests/testthat/test-CRAN.R b/tests/testthat/test-CRAN.R index 9d8badc..53e75ae 100644 --- a/tests/testthat/test-CRAN.R +++ b/tests/testthat/test-CRAN.R @@ -414,3 +414,18 @@ test_that("error for new unit name conflicting with existing", { }, "result is 1 row data frame with column(s) named median, kilobytes (reserved for internal use); please fix by changing the column name(s) in your results", fixed=TRUE) }) +test_that("atime_test outputs historical versions", { + atest <- atime::atime_test( + setup = { + DT <- as.data.table(as.list(1:N)) + measure.vars <- lapply(1:N, function(i) { + x = rep(NA, N) + x[i] = i + x + }) + }, + expr = data.table:::melt(DT, measure.vars = measure.vars), + Slow = "fd24a3105953f7785ea7414678ed8e04524e6955", # Parent of the merge commit (https://github.com/Rdatatable/data.table/commit/ed72e398df76a0fcfd134a4ad92356690e4210ea) of the PR (https://github.com/Rdatatable/data.table/pull/5054) that fixes the issue + Fast = "ed72e398df76a0fcfd134a4ad92356690e4210ea") # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/5054) that fixes the issue + expect_identical(names(atest), c("setup", "expr", "Slow", "Fast")) +})