In google test can a test be marked as skipped instead of failed, during test execution
automated-tests, googletest
Solution
Not that I know of. Probably for good reason, since it looks kinda cheaty to "skip" a test only once you hit a failure! If you know a test will fail before running it, then you can disable it temporarily by prepending `DISABLED_` to the test name.
This seems like a better option since the test code still gets compiled, but the suite's overall result is unaffected since the test is not run. The output nags you by reminding you how many disabled tests you have, and you can always force the disabled test to run if required using the `--gtest_also_run_disabled_tests` arg.
By the way, gtest provides ways to explicitly cause your test to fail rather than doing `ASSERT_TRUE(1 != 1)`.
Problem
In google test is there a way of marking a test as SKIPPED if an assertion fails? e.g. `ASSERT_TRUE(1 != 1)` So if the above statement fails, can I add something to gtest to mark the test as skipped instead of failed?