Cmake support
It would be nice to have Catch2 like cmake integration. Specifically equivalents to:
-
catch_discover_tests(): A macro to automatically detect ctests and runadd_testandset_test_propertieswith appropriate names and labels. -
create_test_sourcelist(): Creates the test driver boilerplate program
The first point could be achieved by regex-ing to get the suite constructors https://github.com/aradi/fortuno/blob/c5a08e62c6c06bb95e54b233be46f696854ed874/test/regression/serial/testapp.f90#L11-L16 Then loop within the files to add individual tests
The second part depends on what templating engine will be implemented for this project, but for the user-side ideally they only define submodules, where the top module generates the test_suite name, and the subroutines within it become all of tests added to the test_suite. The templating engine will generate the program boilerplate and each modules. There is a bit of limitation that it becomes ambiguous which subroutines are meant to be tests and which are just local functions.
That's a very interesting idea! But probably, we should go the same root as Catch does, and allow to call the app with a --list-test-names-only option, which would simply spit out the tests. This is something I was already thinking about, and it would suite also the CMake integration well.