This about testing on the C++ track. I am working offline, and a bit confused about the tesing results. The
#if defined(EXERCISM_RUN_ALL_TESTS)
line is NOT comment out, so would expect all the testing assertions to execute. Yet, when I test the code, the results show:
All tests passed (1 assertion in 1 test case)
Is only the first assertion being executed, or all the assertions being executed and
not reported?
(BTW, I am also working with the FORTRAN track and have notice this question there as well)
I believe the EXERCISM_RUN_ALL_TESTS
is meant to be defined on the web-based test runner and not locally. When working locally, the flow is to pass one test, move that pragma down one test and repeat until all tests pass.
The Fortran testing docs explicitly call that out:
- For each unit test:
- Satisfy compile errors to make the test fail.
- Implement just enough to make the test pass.
- Refactor your implementation to enhance readability, reduce duplication, etc.
- Uncomment the next test