-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
- Problem
For the following 2 examples,
the first one does not terminate after the fatal assertion, while
the second one terminates without handling exception.
The behaviors to fatal assertions can be improved.
#include <boost/ut.hpp>
int main() {
using namespace boost::ut;
"basic"_test = [] {
expect(1_i != 1) << fatal; // fatal assertion
expect(2_i != 2) << "should not run the row";
};
expect(3_i != 3) << "should not run the row";
}#include <boost/ut.hpp>
int main() {
using namespace boost::ut;
expect(1_i != 1) << fatal; // fatal assertion
expect(2_i != 2) << "should not run the row";
}Expected Behavior
UT starts =====================================================================
Running test "basic"...
FAILED in: ...\example.cpp:5 - test condition: [1 != 1]
=> terminated for the fatal issue
===============================================================================
Suite global
tests: 1 | 1 failed
asserts: 1 | 0 passed | 1 failed
Completed =====================================================================
UT starts =====================================================================
FAILED in: ...\example.cpp:4 - test condition: [1 != 1]
=> terminated for the fatal issue
===============================================================================
Suite global
tests: 0 | 0 failed
asserts: 1 | 0 passed | 1 failed
Completed =====================================================================
Actual Behavior
UT starts =====================================================================
Running test "basic"...
FAILED in: ...\example.cpp:5 - test condition: [1 != 1]
FAILED in: ...\example.cpp:8 - test condition: [3 != 3] should not run the row
===============================================================================
Suite global
tests: 1 | 1 failed
asserts: 2 | 0 passed | 2 failed
Completed =====================================================================
UT starts =====================================================================
FAILED in: ...\example.cpp:4 - test condition: [1 != 1]
===============================================================================
Suite global
tests: 0 | 0 failed
asserts: 1 | 0 passed | 1 failed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels