我正在寻找一些可以在第一次测试失败时停止测试用例执行的#define
TEST_F(TestInitializer, 1st-test) {
Initiator.call();
EXPECT_CALL(mock_obj, onAction(false)).Times(AtLeast(0));
// some define I want
::testing::stopIfFailed();
}
TEST_F(TestInitializer, 2nd-test) {
// this test must not be executed if first test failed
}
答案 0 :(得分:0)
使用标志--gtest_break_on_failure
运行二进制文件