R Under development (unstable) (2023-06-23 r84599 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. > ## Run unit tests > ## Charlie Redmon > ## 20170802 > > if (!require("RUnit", quietly = TRUE)) { + warning("Cannot run unit tests. Package RUnit is not available.") + q('no') + } > > library(kutils) > > path <- system.file(package="kutils", "unitTests") > stopifnot(file.exists(path), file.info(path.expand(path))$isdir) > > testsuite.variableKey <- defineTestSuite("VariableKey", + dirs=path, + testFileRegexp="^runit.+\\.R", + testFuncRegexp="^test.+", + rngKind="Marsaglia-Multicarry", + rngNormalKind="Kinderman-Ramage") > > testResult <- runTestSuite(testsuite.variableKey) Executing test function test.assignMissing ... done successfully. Executing test function test.assignRecode ... done successfully. Executing test function test.keyApply ... keyImport guessed that is a wide format key. done successfully. Executing test function test.keyImport ... keyImport guessed that is a wide format key. keyImport guessed that is a wide format key. done successfully. Executing test function test.keyRead ... done successfully. Executing test function test.keyTemplate ... done successfully. Executing test function test.keyUpdate ... keyDiff: 4 rows in key2 are not in key1 keyDiff: 2 rows in key1 are not in key2 keyDiff: 3 rows in key2 are not in key1 done successfully. Executing test function test.keysPool ... [1] "There are no differences between these keys!" done successfully. Executing test function test.long2wide ... keyImport guessed that is a wide format key. done successfully. Executing test function test.safeInteger ... done successfully. Executing test function test.wide2long ... keyImport guessed that is a wide format key. done successfully. Warning messages: 1: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 2: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry > printTextProtocol(testResult, showDetails=TRUE) RUNIT TEST PROTOCOL -- Tue Jun 27 00:26:53 2023 *********************************************** Number of test functions: 11 Number of errors: 0 Number of failures: 0 1 Test Suite : VariableKey - 11 test functions, 0 errors, 0 failures Details *************************** Test Suite: VariableKey Test function regexp: ^test.+ Test file regexp: ^runit.+\.R Involved directory: D:/RCompile/CRANincoming/R-devel/lib/kutils/unitTests --------------------------- Test file: D:/RCompile/CRANincoming/R-devel/lib/kutils/unitTests/runit.VariableKey.R test.assignMissing: (16 checks) ... OK (0 seconds) test.assignRecode: (3 checks) ... OK (0 seconds) test.keyApply: (44 checks) ... OK (0.33 seconds) test.keyImport: (2 checks) ... OK (0.08 seconds) test.keyRead: (1 checks) ... OK (0.03 seconds) test.keyTemplate: (6 checks) ... OK (0.04 seconds) test.keyUpdate: (5 checks) ... OK (0.05 seconds) test.keysPool: (2 checks) ... OK (0.02 seconds) test.long2wide: (3 checks) ... OK (0.06 seconds) test.safeInteger: (2 checks) ... OK (0 seconds) test.wide2long: (2 checks) ... OK (0.05 seconds) > > tmp <- getErrors(testResult) > if (tmp$nFail > 0 | tmp$nErr > 0) { + stop(paste0("\n\nUnit testing failed (", tmp$nFail, " test failures), ", + tmp$nErr, " R errors)\n\n")) + } > > proc.time() user system elapsed 0.92 0.10 1.01