11

I'm looking for some #define which can stop test-case execution if first test failed

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
}
273K
  • 29,503
  • 10
  • 41
  • 64
Yuriy Gyerts
  • 1,464
  • 18
  • 30

1 Answers1

18

run binary with flag --gtest_break_on_failure

Yuriy Gyerts
  • 1,464
  • 18
  • 30