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
I'm using lest for test cases for the exercises of a C++ course. My problem is that sometimes I EXPECT some invariant of an object, and if that's failing, it's not safe to call the destructor.
However, EXPECT throws an exception before it prints its message, so effectively I get a crash by the destructor of the local test object and never see the message from the failed test, which is not very useful.
Preferably I'd like to avoid the crash completely (by calling exit() or terminate() myself), but the minimum would be to at least see the message before the crash.
The text was updated successfully, but these errors were encountered:
Detlef Vollmann brings up the following:
I'm using lest for test cases for the exercises of a C++ course. My problem is that sometimes I EXPECT some invariant of an object, and if that's failing, it's not safe to call the destructor.
However, EXPECT throws an exception before it prints its message, so effectively I get a crash by the destructor of the local test object and never see the message from the failed test, which is not very useful.
Preferably I'd like to avoid the crash completely (by calling exit() or terminate() myself), but the minimum would be to at least see the message before the crash.
The text was updated successfully, but these errors were encountered: