Skip to content

Commit f6981d6

Browse files
committed
rename optimization parameter also in test
1 parent 9e1297e commit f6981d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/test.data.table.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,18 @@ gc_mem = function() {
363363

364364
test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,notOutput=NULL,ignore.warning=NULL,options=NULL,env=NULL,optimize=NULL) {
365365
# if optimization is provided, test across multiple optimization levels
366-
if (!is.null(optimization)) {
366+
if (!is.null(optimize)) {
367367
cl = match.call()
368368
cl$optimize= NULL # Remove optimization levels from the recursive call
369369

370370
# Check if y was explicitly provided (not just the default)
371371
y_provided = !missing(y)
372372
vector_params = mget(c("error", "warning", "message", "output", "notOutput", "ignore.warning"), environment())
373-
compare = !y_provided && length(optimization)>1L && !any(lengths(vector_params))
373+
compare = !y_provided && length(optimize)>1L && !any(lengths(vector_params))
374374

375-
for (i in seq_along(optimization)) {
375+
for (i in seq_along(optimize)) {
376376
cl$num = num + (i - 1L) * 1e-6
377-
opt_level = list(datatable.optimize = optimization[i])
377+
opt_level = list(datatable.optimize = optimize[i])
378378
cl$options = if (!is.null(options)) c(as.list(options), opt_level) else opt_level
379379
for (param in names(vector_params)) {
380380
val = vector_params[[param]]

0 commit comments

Comments
 (0)