From e9006272c2ec4335020740b91bf9607808cc5d50 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 23 Sep 2016 12:32:59 +1200 Subject: [PATCH] Add a make command for checking expected failures --- src/Makefile.gtest.include | 3 +++ src/gtest/test_tautology.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index bd6bae83d..fa730accd 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -36,3 +36,6 @@ zcash_gtest_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static zcash-gtest_check: zcash-gtest FORCE ./zcash-gtest + +zcash-gtest-expected-failures: zcash-gtest FORCE + ./zcash-gtest --gtest_filter=*DISABLED_* --gtest_also_run_disabled_tests diff --git a/src/gtest/test_tautology.cpp b/src/gtest/test_tautology.cpp index 56b3555f2..3d1386714 100644 --- a/src/gtest/test_tautology.cpp +++ b/src/gtest/test_tautology.cpp @@ -3,3 +3,8 @@ TEST(tautologies, seven_eq_seven) { ASSERT_EQ(7, 7); } + +TEST(tautologies, DISABLED_ObviousFailure) +{ + FAIL() << "This is expected"; +}