@@ -361,25 +361,25 @@ gc_mem = function() {
361361 # nocov end
362362}
363363
364- test = function (num ,x ,y = TRUE ,error = NULL ,warning = NULL ,message = NULL ,output = NULL ,notOutput = NULL ,ignore.warning = NULL ,options = NULL ,env = NULL ,levels = NULL ) {
365- # if levels is provided, test across multiple optimization levels
366- if (! is.null(levels )) {
364+ test = function (num ,x ,y = TRUE ,error = NULL ,warning = NULL ,message = NULL ,output = NULL ,notOutput = NULL ,ignore.warning = NULL ,options = NULL ,env = NULL ,optimization = NULL ) {
365+ # if optimization is provided, test across multiple optimization levels
366+ if (! is.null(optimization )) {
367367 cl = match.call()
368- cl $ levels = NULL # Remove levels from the recursive call
368+ cl $ optimization = NULL # Remove optimization levels from the recursive call
369369
370370 vector_params = c(" error" , " warning" , " message" , " output" , " notOutput" , " ignore.warning" )
371371 # Check if y was explicitly provided (not just the default)
372372 y_provided = ! missing(y )
373- compare = ! y_provided && length(levels )> 1L && ! any(vapply_1b(vector_params , function (p ) length(get(p , envir = environment())) > 0L ))
373+ compare = ! y_provided && length(optimization )> 1L && ! any(vapply_1b(vector_params , function (p ) length(get(p , envir = environment())) > 0L ))
374374
375- for (i in seq_along(levels )) {
375+ for (i in seq_along(optimization )) {
376376 cl $ num = num + (i - 1L ) * 1e-6
377- opt_level = list (datatable.optimize = levels [i ])
377+ opt_level = list (datatable.optimize = optimization [i ])
378378 cl $ options = if (! is.null(options )) c(as.list(options ), opt_level ) else opt_level
379379 for (p in vector_params ) {
380380 val = get(p , envir = environment())
381381 if (length(val ) > 0L ) {
382- cl [[p ]] = val [((i - 1L ) %% length(val )) + 1L ] # cycle through values if fewer than levels
382+ cl [[p ]] = val [((i - 1L ) %% length(val )) + 1L ] # cycle through values if fewer than optimization levels
383383 }
384384 }
385385
0 commit comments