OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Test Rules

This section describes how the functionality of the OpenTrep library should be verified. In the `test/opentrep' subdirectory, test source files are provided. All functionality should be tested using these test source files.

The Test Source Files

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

The test source file should print relevant data to a standard output that can be used to verify the functionality. All relevant parameter settings should be tested.

The test source file should be placed in the `test/opentrep' subdirectory and should have a name ending with `TestSuite.cpp'.

The Reference File

Consider a test source file named `YieldTestSuite.cpp'. A reference file named `YieldTestSuite.ref' should accompany the test source file. The reference file contains a reference printout of the standard output generated when running the test program. The reference file should be maintained using version control and updated according to the test source file.

Testing OpenTrep Library

One can compile and execute all test programs from the `test/opentrep' sub-directory by typing:

% make check

after successful compilation of the OpenTrep library.