This PR is in draft as I wouldn't recommended merging as is but I wanted to circulate to the group before going any further down this road.
This PR provides a quick and dirty adoption of the pFUnit framework and its application to a couple of trivial test cases.
See unit_tests/README.md for instructions on how to build and run the tests.
The test cases are provided in unit_tests/test_simple.pf. The pf suffix indicates that these files are fortran with the addition of pre-processor directives provided by pFUnit. The pre-processing is taken care of by the changes made to CMakeLists.txt and run as part of the standard build process for the code base (just for purposes of this demo).
The preprocessor directives make it possible to write tests with minimal boiler plate. There are two tests; the first is a trivial demonstration of some of the assert preprocessor directives, whilst the second demonstrates testing a function from uDALES.
This PR is in draft as I wouldn't recommended merging as is but I wanted to circulate to the group before going any further down this road.
This PR provides a quick and dirty adoption of the pFUnit framework and its application to a couple of trivial test cases.
See
unit_tests/README.md
for instructions on how to build and run the tests.The test cases are provided in
unit_tests/test_simple.pf
. Thepf
suffix indicates that these files are fortran with the addition of pre-processor directives provided by pFUnit. The pre-processing is taken care of by the changes made toCMakeLists.txt
and run as part of the standard build process for the code base (just for purposes of this demo).The preprocessor directives make it possible to write tests with minimal boiler plate. There are two tests; the first is a trivial demonstration of some of the
assert
preprocessor directives, whilst the second demonstrates testing a function from uDALES.