Testing
divERGe uses Catch3 for testing. Running the tests can be achieved by a call to
diverge_run_tests(), or by running the divERGe executable.
-
int diverge_run_tests(int argc, char **argv)
[source] run the tests, including control over which tests to run etc. via command line arguments. Usually, a call would look like
#include <diverge.h> int main( int argc, char** argv ) { diverge_init( &argc, &argv ); diverge_compilation_status(); int r = diverge_run_tests( argc, argv ); diverge_finalize(); return r; }
which is exactly what is done in
src/main.c, i.e., the file that is compiled to the divERGe executable when making the ‘test’ target.- Parameters:
argc (int) – number of command line arguments
argv (char**) – command line argument vector