fortuno.old icon indicating copy to clipboard operation
fortuno.old copied to clipboard

Cmake support

Open LecrisUT opened this issue 2 years ago • 1 comments

It would be nice to have Catch2 like cmake integration. Specifically equivalents to:

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.

LecrisUT avatar Feb 07 '23 16:02 LecrisUT

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.

aradi avatar Feb 07 '23 20:02 aradi