PSCF v1.1
Unit Tests

Coding Standards (Prev)        

The src/test/ directory contains source code for a simple unit test framework that is used to construct unit tests for individual classes. Usage examples are provided in what follows, and in the src/test/examples directory.

Each of the namespace level subdirectories of the src/ directory has a subdirectory named tests/ that contains unit tests for the code in that namespace. The unit tests are not compiled by makefiles that compiles the classes in the src/ directory. A composite test containing all of the unit tests of classes in a particular namespace may be compiled by cd'ing to the tests/ subdirectory of the directory that holds the source code for that namespace, and then entering "make all" (to compile the tests) and "make run" (to run them). Entering "make all" from a subdirectory of tests/ will generally creates an executable, named named "Test", that runs all of the tests in that directory. Some unit test directories contain a separate makefile target to build an executable for tests that require MPI, often called MpiTest.

See also
Unit Test Framework Module

Contents:


Coding Standards (Prev)         Developer Information (Up)