Assertion Behavior:
--gtest_break_on_failure
Turn assertion failures into debugger break-points.
--gtest_throw_on_failure
Turn assertion failures into C++ exceptions for use by an external
test framework.
--gtest_catch_exceptions=0
Do not report exceptions as test failures. Instead, allow them
to crash the program or throw a pop-up (on Windows).
1条答案
按热度按时间hjzp0vay1#
如果GTest是底层测试框架,那么有一个GTest命令行选项在Windows上很有帮助:
MyTest.exe --gtest_catch_exceptions=0
注意:这并没有回答关于CTest的问题。我还没有找到一个类似的选项CTest。
来自GTest的帮助信息: