Testing Trasim

The subdirectory "tests" of the Trasim top level directory contains regression tests that test most functionality implemented in "src". Most sub directories in "tests" correspond to files in the "src" directory. The sub directory "test-suite" in "tests" contains some stuff common for all tests. Some of the tests are graphical and need Gnuplot (tested mostly with versions 3.7 and 3.8*). These tests are optional, though.

The instructions for building a test are similar to the installation instructions in the section of the INSTALLATION file in Trasim's top level directory. The main difference is that the directory where the action takes place is "tests/" and that the qmake files are named "test.pro". To build all tests the action takes place in "tests" and the qmake file is "tests.pro" (note that qmake'ing this file will result in "Makefile.test" files in the individual directories).

To run a test, just run "./test" in "tests/". To run all tests, run "run-all-tests" in the "tests" directory.

Note that if you add a new test directory, you should also update "tests.pro" and "run-all-tests".

Note that if you modify a test, it sometimes pays off to look in the directory of that test which may contain e.g. Mathematica notebooks with calculations that were used to generate values for comparison. Such a notebook could be reused to create new values.