With CMake and CTest you can add a test for my_algorithm
in the following way:
add_executable(my_algorithm ...)
add_test(NAME integration_test_01 COMMAND my_algorithm)
set_tests_properties(integration_test_01
PROPERTIES PASS_REGULAR_EXPRESSION "mse\\=1\\.2345e\\-6")
The output of the command my_algorithm
will be checked against the specified regular expression and if the output does not match the test will fail.
When you run tests with ctest -T Test
the generated XML report will contain the actual output of the command nested in a <Measurement>
tag.