You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The unit tests do not cover any code in the main target, for obvious reasons. This means we need system level tests to be added to the code base, which are ran by the pr_checker action. This is how #165 has escaped our attention.
An initial obvious approach is to provide a python script that execute the program with a known set of inputs (test/programs/*) and test the output against the expected.
A better alternative would be to change the main() signature if doing a test build (should change the unit_test.cmake file in this case...), expose it publicly by a test-build-only header, and then call it from a normal test case whilst hijacking std::cin and std::cout (or providing alternatives to it?) .
The text was updated successfully, but these errors were encountered:
The unit tests do not cover any code in the
main
target, for obvious reasons. This means we need system level tests to be added to the code base, which are ran by thepr_checker
action. This is how #165 has escaped our attention.An initial obvious approach is to provide a python script that execute the program with a known set of inputs (
test/programs/*
) and test the output against the expected.A better alternative would be to change the
main()
signature if doing a test build (should change theunit_test.cmake
file in this case...), expose it publicly by a test-build-only header, and then call it from a normal test case whilst hijackingstd::cin
andstd::cout
(or providing alternatives to it?) .The text was updated successfully, but these errors were encountered: