Reaction Network Monte Carlo
There are end-to-end testing examples for GMC and NPMC but not for LGMC as its trajectories are not deterministic. These tests can be run as follows from the main RNMC
directory:
$ tests/test.sh
The tests
folder also contains unit tests using GoogleTest. Unit tests are available for the following classes: reaction_network
, nano_particle
, lattice_reaction_network
, and lattice
. The unit tests can be used to help determine if changes to the open-source code introduce bugs but are not completely comprehensive.
$ make all
$ make foo_test
$ make clean
Each unit test will either fail or pass. GoogleTest can use colors in its terminal output to make it easier to spot the important information:
... tests that pass ... [----------] 1 test from FooTest [ RUN ] FooTest.DoesAbc [ OK ] FooTest.DoesAbc [----------] 2 tests from BarTest [ RUN ] BarTest.HasXyzProperty [ OK ] BarTest.HasXyzProperty [ RUN ] BarTest.ReturnsTrueOnSuccess ... tests that fail ... [ FAILED ] BarTest.ReturnsTrueOnSuccess ... [==========] 30 tests from 14 test suites ran. [ PASSED ] 28 tests. [ FAILED ] 2 tests, listed below: [ FAILED ] BarTest.ReturnsTrueOnSuccess [ FAILED ] AnotherTest.DoesXyz 2 FAILED TESTS