tests/runTestSuite.R

# unit testing
if (require(RUnit, quietly = TRUE)) {

    # load package
    library(spcosa)

    # define the test suite
    testSuite <- defineTestSuite(
        name = "spcosa",
        dirs = file.path(getwd(), "unitTests"),
        testFileRegexp = "^runit_",
        testFuncRegexp = "^test_"
    )
    
    # run test suite
    testResult <- runTestSuite(testSuite)
    
    # print HTML version to a file
    printHTMLProtocol(testResult, fileName = "unitTesting.html")
}

Try the spcosa package in your browser

Any scripts or data that you put into this service are public.

spcosa documentation built on April 11, 2023, 6:04 p.m.