snitch-org / snitch

Lightweight C++20 testing framework.
Boost Software License 1.0
263 stars 9 forks source link

Fix capture/section state after unhandled exception(s) #178

Closed cschreib closed 2 months ago

cschreib commented 2 months ago

This PR does the following:

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.03%. Comparing base (d663212) to head (7994241). Report is 8 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/snitch-org/snitch/pull/178/graphs/tree.svg?width=650&height=150&src=pr&token=X422DE81PN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org)](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org) ```diff @@ Coverage Diff @@ ## main #178 +/- ## ========================================== + Coverage 94.00% 94.03% +0.03% ========================================== Files 29 29 Lines 1700 1709 +9 ========================================== + Hits 1598 1607 +9 Misses 102 102 ``` | [Files with missing lines](https://app.codecov.io/gh/snitch-org/snitch/pull/178?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org) | Coverage Δ | | |---|---|---| | [include/snitch/snitch\_capture.hpp](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&filepath=include%2Fsnitch%2Fsnitch_capture.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org#diff-aW5jbHVkZS9zbml0Y2gvc25pdGNoX2NhcHR1cmUuaHBw) | `100.00% <100.00%> (ø)` | | | [include/snitch/snitch\_string\_utility.hpp](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&filepath=include%2Fsnitch%2Fsnitch_string_utility.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org#diff-aW5jbHVkZS9zbml0Y2gvc25pdGNoX3N0cmluZ191dGlsaXR5LmhwcA==) | `100.00% <ø> (ø)` | | | [src/snitch\_capture.cpp](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&filepath=src%2Fsnitch_capture.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org#diff-c3JjL3NuaXRjaF9jYXB0dXJlLmNwcA==) | `92.00% <100.00%> (+0.69%)` | :arrow_up: | | [src/snitch\_registry.cpp](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&filepath=src%2Fsnitch_registry.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org#diff-c3JjL3NuaXRjaF9yZWdpc3RyeS5jcHA=) | `95.18% <100.00%> (+0.05%)` | :arrow_up: | | [src/snitch\_section.cpp](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&filepath=src%2Fsnitch_section.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org#diff-c3JjL3NuaXRjaF9zZWN0aW9uLmNwcA==) | `85.71% <100.00%> (+0.71%)` | :arrow_up: | | [src/snitch\_test\_data.cpp](https://app.codecov.io/gh/snitch-org/snitch/pull/178?src=pr&el=tree&filepath=src%2Fsnitch_test_data.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org#diff-c3JjL3NuaXRjaF90ZXN0X2RhdGEuY3Bw) | `95.65% <100.00%> (+0.19%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/snitch-org/snitch/pull/178?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/snitch-org/snitch/pull/178?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org). Last update [d663212...7994241](https://app.codecov.io/gh/snitch-org/snitch/pull/178?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=snitch-org).
cschreib commented 2 months ago

Thanks for the review @tocic, sorry I had unpushed changes. The issue reported in #177 also affected SECTION(...), the last commit addresses this. This PR should be complete now ;)