- using R Under development (unstable) (2024-03-26 r86210)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-13 (Debian 13.2.0-13) 13.2.0
GNU Fortran (Debian 13.2.0-13) 13.2.0
- running under: Debian GNU/Linux trixie/sid
- using session charset: UTF-8
- checking for file ‘codetools/DESCRIPTION’ ... OK
- this is package ‘codetools’ version ‘0.2-19’
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘codetools’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s/0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [5s/10s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in Makefiles ... OK
- checking for GNU extensions in Makefiles ... OK
- checking include directives in Makefiles ... OK
- checking examples ... [2s/2s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [1s/1s] 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
- checking PDF version of manual ... [4s/11s] OK
- checking HTML version of manual ... [0s/1s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR