eckit
eckit copied to clipboard
Nested SECTIONs in tests do not appear to work
What happened?
The test case test_polygon uses nested SECTION scopes, and it appears that lines of code in inner SECTION scopes are not run. I think test_polygon may be the only eckit test using this nesting.
What are the steps to reproduce the bug?
- In file
test_polygon.ccbelow line 240 (inside nested SECTION "Contains edge"), add new line of codeEXPECT(false);. Expect testctest -R eckit_test_geometry_polygonto fail, but it passes. - To show expected behavior, move this new line of code to above line 240 (in outer SECTION "Simple rectangular polygon"). Expect test to fail, and it does.
Version
v1.20.2
Platform (OS and architecture)
macOS 12.6.4; intel i7
Relevant log output
No response
Accompanying data
No response
Organisation
No response
@pmaciel do you have a fix for this in another branch?
@pmaciel do you have a fix for this in another branch?
My fix for it was to flatten the hierarchy, ie remove the nested SECTIONs. The work I have isn't ready to be merged, so I suggest to flatten here as well?
This should now be fixed. Thanks again for reporting.