R Under development (unstable) (2023-10-04 r85267 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(matrixTests) > source("utils/capture.r") > > #--- x argument errors --------------------------------------------------------- > > # cannot be missing > err <- 'argument "x" is missing, with no default' > res <- capture(row_andersondarling()) > stopifnot(all.equal(res$error, err)) > > # cannot be NULL > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(NULL)) > stopifnot(all.equal(res$error, err)) > > # cannot be character > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(c("a", "b"))) > stopifnot(all.equal(res$error, err)) > > # cannot be logical > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(c(TRUE, FALSE))) > stopifnot(all.equal(res$error, err)) > > # cannot be complex > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(complex(c(1,2), c(3,4)))) > stopifnot(all.equal(res$error, err)) > > # cannot be data.frame containing some non numeric data > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(iris)) > stopifnot(all.equal(res$error, err)) > > # cannot be a list > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(as.list(c(1:5)))) > stopifnot(all.equal(res$error, err)) > > # cannot be in a list > err <- '"x" must be a numeric matrix or vector' > res <- capture(row_andersondarling(list(1:5))) > stopifnot(all.equal(res$error, err)) > > > proc.time() user system elapsed 0.10 0.04 0.15