sinojelly / mockcpp

Two C/C++ testing tools, mockcpp and testngpp.
Apache License 2.0
67 stars 42 forks source link

:bug: testcase crash for gcc skip catch on destructor #17

Closed fish2bird closed 3 years ago

fish2bird commented 3 years ago

for c++11, destrcutor taken defaultly as noexcept(true), so gcc may skip catch block over destractor.

From https://en.cppreference.com/w/cpp/language/destructor#Exceptions

As any other function, a destructor may terminate by throwing an exception (this usually requires it to be explicitly declared noexcept(false)) (since C++11)

This fix will close #16