Reported by hywel on 6 Sep 2011 13:09 UTC
Add unit-testing to HemeLB. This ticket will be concerned with only the lattice-Boltzmann kernel. Further tests will be added on later issues.
I'm going to use CppUnit (https://launchpad.net/cppunit2) for this, mainly because it's available as a package for Ubuntu (where CxxTest isn't). It also supports fixtures and uses macros for asserts in the same way CxxTest does.
I'm going to create a new hemelb::tests namespace (and corresponding directory structure) within the Code folder of the repository.
The only tests I'm going to add are for the LB kernel, so I'll have a Code/Tests/LBTests folder and namespace with one file and one class for each of the following categories: Kernel Tests, Collision tests and Streamer Tests. NB. this will have tests for (e.g.) all kernels in the code in the same file.
These will test all public functions of the 2 kernels, 4 collision operators and 1 streaming operator implemented. I'll use the same, tiny, artificial geometry for each one, and work out the correct collided and streamed values by hand to compare against (where possible).
I may also need to adapt the rest of the code to make the tests pass.
I'll make it so the tests are not compiled in the HemeLB executable and are only compiled if a specific flag is set in the machine's make/config file.
Reported by hywel on 6 Sep 2011 13:09 UTC Add unit-testing to HemeLB. This ticket will be concerned with only the lattice-Boltzmann kernel. Further tests will be added on later issues.