CRAN Package Check Results for Package codetools

Last updated on 2024-03-28 19:48:27 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.2-19 2.84 26.26 29.10 ERROR
r-devel-linux-x86_64-debian-gcc 0.2-19 1.73 19.94 21.67 ERROR
r-devel-linux-x86_64-fedora-clang 0.2-19 22.81 OK
r-devel-linux-x86_64-fedora-gcc 0.2-19 24.10 OK
r-devel-windows-x86_64 0.2-19 6.00 194.00 200.00 ERROR
r-patched-linux-x86_64 0.2-19 2.71 24.98 27.69 ERROR
r-release-linux-x86_64 0.2-19 2.35 25.99 28.34 OK
r-release-macos-arm64 0.2-19 16.00 OK
r-release-macos-x86_64 0.2-19 22.00 OK
r-release-windows-x86_64 0.2-19 3.00 39.00 42.00 OK
r-oldrel-macos-arm64 0.2-19 16.00 OK
r-oldrel-windows-x86_64 0.2-19 28.00 51.00 79.00 OK

Check Details

Version: 0.2-19
Check: tests
Result: ERROR Running ‘tests.R’ [0s/1s] Running the tests in ‘tests/tests.R’ failed. Complete output: > library(codetools) > assert <- function(e) + if (! e) stop(paste("assertion failed:", deparse(substitute(e)))) > local({ + st <- function(e) { + v <- NULL + write <- function(x) + v <<- paste(v, as.character(x), sep = "") + showTree(e, write = write) + v + } + assert(identical(st(quote(f(x))), "(f x)\n")) + assert(identical(st(quote((x+y)*z)), "(* (\"(\" (+ x y)) z)\n")) + assert(identical(st(quote(-3)), "(- 3)\n")) + }) > assert(identical(constantFold(quote(3)), 3)) > assert(identical(constantFold(quote(1+2)), 3)) > assert(identical(constantFold(quote(1+2+x)), NULL)) > assert(identical(constantFold(quote(pi)), pi)) > assert(identical(constantFold(quote(pi), "pi"), NULL)) > assert(identical(constantFold(quote(pi), "pi", FALSE), FALSE)) > assert(identical(getAssignedVar(quote("v"<-x)), "v")) > assert(identical(getAssignedVar(quote(v<-x)), "v")) > assert(identical(getAssignedVar(quote(f(v)<-x)), "v")) > assert(identical(getAssignedVar(quote(f(g(v,2),1)<-x)), "v")) > assert(identical(findLocals(quote(x<-1)), "x")) > assert(identical(findLocals(quote(f(x)<-1)), "x")) > assert(identical(findLocals(quote(f(g(x,2),1)<-1)), "x")) > assert(identical(findLocals(quote(x<-y<-1)), c("x","y"))) > assert(identical(findLocals(quote(local(x<-1,e))), "x")) > assert(identical(findLocals(quote(local(x<-1))), character(0))) > assert(identical(findLocals(quote({local<-1;local(x<-1)})), c("local", "x"))) > assert(identical(findLocals(quote(local(x<-1,e)), "local"), "x")) > local({ + f <- function (f, x, y) { + local <- f + local(x <- y) + x + } + assert(identical(findLocals(body(f)), c("local","x"))) + }) > local({ + env <- new.env() + assign("local", 1, env) + assert(identical(findLocals(quote(local(x<-1,e)), env), "x")) + }) > assert(identical(findLocals(quote(assign(x, 3))), character(0))) > assert(identical(findLocals(quote(assign("x", 3))), "x")) > assert(identical(findLocals(quote(assign("x", 3, 4))), character(0))) > local({ + f<-function() { x <- 1; y <- 2} + assert(identical(sort(findFuncLocals(formals(f),body(f))), c("x","y"))) + f<-function(u = x <- 1) y <- 2 + assert(identical(sort(findFuncLocals(formals(f),body(f))), c("x","y"))) + }) > assert(identical(flattenAssignment(quote(x)), list(NULL, NULL))) > assert(identical(flattenAssignment(quote(f(x, 1))), + list(list(quote(x)), + list(quote("f<-"(x, 1, value = `*tmpv*`)))))) > assert(identical(flattenAssignment(quote(f(g(x, 2), 1))), + list(list(quote(x), quote(g(`*tmp*`, 2))), + list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)), + quote("g<-"(x, 2, value = `*tmpv*`)))))) > assert(identical(flattenAssignment(quote(f(g(h(x, 3), 2), 1))), + list(list(quote(x), + quote(h(`*tmp*`, 3)), + quote(g(`*tmp*`, 2))), + list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)), + quote("g<-"(`*tmp*`, 2, value = `*tmpv*`)), + quote("h<-"(x, 3, value = `*tmpv*`)))))) > assert(identical(flattenAssignment(quote(f(g(h(k(x, 4), 3), 2), 1))), + list(list(quote(x), + quote(k(`*tmp*`, 4)), + quote(h(`*tmp*`, 3)), + quote(g(`*tmp*`, 2))), + list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)), + quote("g<-"(`*tmp*`, 2, value = `*tmpv*`)), + quote("h<-"(`*tmp*`, 3, value = `*tmpv*`)), + quote("k<-"(x, 4, value = `*tmpv*`)))))) > if (getRversion() >= "2.13.0") + assert(identical(flattenAssignment(quote(base::diag(x))), + list(list(quote(x)), + list(quote(base::`diag<-`(x, value = `*tmpv*`)))))) > assert(! "y" %in% findGlobals(function() if (is.R()) x else y)) Error in assert(!"y" %in% findGlobals(function() if (is.R()) x else y)) : assertion failed: !"y" %in% findGlobals(function() if (is.R()) x else y) In addition: Warning messages: 1: In is.R() : 'is.R' is deprecated. See help("Deprecated") and help("base-deprecated"). 2: Error in is.R() : deprecation turned into an error Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64

Version: 0.2-19
Check: tests
Result: ERROR Running 'tests.R' [159s] Running the tests in 'tests/tests.R' failed. Complete output: > library(codetools) > assert <- function(e) + if (! e) stop(paste("assertion failed:", deparse(substitute(e)))) > local({ + st <- function(e) { + v <- NULL + write <- function(x) + v <<- paste(v, as.character(x), sep = "") + showTree(e, write = write) + v + } + assert(identical(st(quote(f(x))), "(f x)\n")) + assert(identical(st(quote((x+y)*z)), "(* (\"(\" (+ x y)) z)\n")) + assert(identical(st(quote(-3)), "(- 3)\n")) + }) > assert(identical(constantFold(quote(3)), 3)) > assert(identical(constantFold(quote(1+2)), 3)) > assert(identical(constantFold(quote(1+2+x)), NULL)) > assert(identical(constantFold(quote(pi)), pi)) > assert(identical(constantFold(quote(pi), "pi"), NULL)) > assert(identical(constantFold(quote(pi), "pi", FALSE), FALSE)) > assert(identical(getAssignedVar(quote("v"<-x)), "v")) > assert(identical(getAssignedVar(quote(v<-x)), "v")) > assert(identical(getAssignedVar(quote(f(v)<-x)), "v")) > assert(identical(getAssignedVar(quote(f(g(v,2),1)<-x)), "v")) > assert(identical(findLocals(quote(x<-1)), "x")) > assert(identical(findLocals(quote(f(x)<-1)), "x")) > assert(identical(findLocals(quote(f(g(x,2),1)<-1)), "x")) > assert(identical(findLocals(quote(x<-y<-1)), c("x","y"))) > assert(identical(findLocals(quote(local(x<-1,e))), "x")) > assert(identical(findLocals(quote(local(x<-1))), character(0))) > assert(identical(findLocals(quote({local<-1;local(x<-1)})), c("local", "x"))) > assert(identical(findLocals(quote(local(x<-1,e)), "local"), "x")) > local({ + f <- function (f, x, y) { + local <- f + local(x <- y) + x + } + assert(identical(findLocals(body(f)), c("local","x"))) + }) > local({ + env <- new.env() + assign("local", 1, env) + assert(identical(findLocals(quote(local(x<-1,e)), env), "x")) + }) > assert(identical(findLocals(quote(assign(x, 3))), character(0))) > assert(identical(findLocals(quote(assign("x", 3))), "x")) > assert(identical(findLocals(quote(assign("x", 3, 4))), character(0))) > local({ + f<-function() { x <- 1; y <- 2} + assert(identical(sort(findFuncLocals(formals(f),body(f))), c("x","y"))) + f<-function(u = x <- 1) y <- 2 + assert(identical(sort(findFuncLocals(formals(f),body(f))), c("x","y"))) + }) > assert(identical(flattenAssignment(quote(x)), list(NULL, NULL))) > assert(identical(flattenAssignment(quote(f(x, 1))), + list(list(quote(x)), + list(quote("f<-"(x, 1, value = `*tmpv*`)))))) > assert(identical(flattenAssignment(quote(f(g(x, 2), 1))), + list(list(quote(x), quote(g(`*tmp*`, 2))), + list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)), + quote("g<-"(x, 2, value = `*tmpv*`)))))) > assert(identical(flattenAssignment(quote(f(g(h(x, 3), 2), 1))), + list(list(quote(x), + quote(h(`*tmp*`, 3)), + quote(g(`*tmp*`, 2))), + list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)), + quote("g<-"(`*tmp*`, 2, value = `*tmpv*`)), + quote("h<-"(x, 3, value = `*tmpv*`)))))) > assert(identical(flattenAssignment(quote(f(g(h(k(x, 4), 3), 2), 1))), + list(list(quote(x), + quote(k(`*tmp*`, 4)), + quote(h(`*tmp*`, 3)), + quote(g(`*tmp*`, 2))), + list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)), + quote("g<-"(`*tmp*`, 2, value = `*tmpv*`)), + quote("h<-"(`*tmp*`, 3, value = `*tmpv*`)), + quote("k<-"(x, 4, value = `*tmpv*`)))))) > if (getRversion() >= "2.13.0") + assert(identical(flattenAssignment(quote(base::diag(x))), + list(list(quote(x)), + list(quote(base::`diag<-`(x, value = `*tmpv*`)))))) > assert(! "y" %in% findGlobals(function() if (is.R()) x else y)) Warning message: In is.R() : 'is.R' is deprecated. See help("Deprecated") and help("base-deprecated"). > assert(identical(findGlobals(function() if (FALSE) x), "if")) > # **** need more test cases here > assert(identical(sort(findGlobals(function(x) { z <- 1; x + y + z})), + sort(c("<-", "{", "+", "y")))) > > assert(identical(findGlobals(function() Quote(x)), "Quote")) > > > ## bquote test cases (from Dirk Schumacher) > checkUsage(function() { + s <- as.symbol("y") + bquote( + `for`(.(s), 1, x) + ) + }, report = stop) > > checkUsage(function() { + x <- 1 + bquote(.(x) * y) + }, report = stop) > > checkUsage(function() { + x <- 1 + bquote(.(x * 1) * y) + }, report = stop) > > > ## more bquote tests > checkUsage(function(x) bquote(.(x) + y), report = stop) > tools::assertError(checkUsage(function() bquote(.(x)), report = stop)) > > proc.time() user system elapsed 0.28 0.03 0.29 Flavor: r-devel-windows-x86_64