Test Rules

This section describes rules how the functionality of the IT++ library should be verified. In the ``tests'` subdirectory test files are provided. All functionality should be tested using these test files.

# The Test File

Each new IT++ module/class should be accompanied with a test file. The test file is an implementation in C++ that tests the functionality of a function/class or a group of functions/classes called modules. The test file should test relevant parameter settings and input/output relations to guarantee correct functionality of the corresponding classes/functions. The test files should be maintained using version control and updated whenever new functionality is added to the IT++ library.

The test file should use Google C++ Testing Framework (http://code.google.com/p/googletest/) for unit tests and should be, if possible, self contained, i.e. no external data needed. Also, if you use random data, please use IT++ random generators with a fixed seed in order to ensure the same results on different platforms.

The test file should be placed in the ``gtests'` subdirectory and should have a name ending with `‘_test.cpp’`.

# Testing IT++ Library

One can compile and execute all test programs from ``gtests'` subdirectory by typing

    % ./itpp_gtests

after successful compilation of the IT++ library. Note that unit test compilation must be enabled by specifying for cmake the path to the folder containing Google C++ Testing Framework sources. From the build folder the command is:

    % cmake .. -DGTEST_DIR=/path/to/gtest

Generated on Mon Jun 10 2024 11:49:28 for IT++ by Doxygen 1.9.8