Unit Tests
One of the reviewers of the theory paper asks how softclassval
ensures computational
correctness.
Unit Tests
softclassval
uses svUnit
for unit
testing.
This means that to each function a piece of testing code can be attached, additional tests can be stored in separate testing functions. In the tests, the function to be tested is called. If the function’s results do not meet the expectations, an error occurs.
softclassval
’s unit tests consist of ca. twice as many lines of code compared to coding the
functionality of the package.
Running the Unit Tests
All unit tests in package softclassval
can be executed inside R:
softclassval.unittest ()
is also called during R CMD check
.
Successful passing of the unit tests is somewhat hidden in the last lines of R CMD check
’s output:
Automatic Check results
Because of R CMD check
running the unit tests, all unit tests need to be successful during the
automatic package building process at R-Forge and
CRAN.
- summary table of CRAN check results for all packages
- summary table of CRAN check results for
softclassval