summaryrefslogtreecommitdiffstats
path: root/googletest/test
diff options
context:
space:
mode:
authorChris Johnson <chrisjohnsonmail@gmail.com>2023-06-22 17:01:48 (GMT)
committerGitHub <noreply@github.com>2023-06-22 17:01:48 (GMT)
commitb2a2d36f3a28921af8ccbed92c47fbfe8570173c (patch)
treec7a7268259498bd3a4c7137c0889178af3c7c2b4 /googletest/test
parente3d405f62b61a228e5359208b1fa933e03eadc65 (diff)
parentec4fed93217bc2830959bb8e86798c1d86956949 (diff)
downloadgoogletest-b2a2d36f3a28921af8ccbed92c47fbfe8570173c.zip
googletest-b2a2d36f3a28921af8ccbed92c47fbfe8570173c.tar.gz
googletest-b2a2d36f3a28921af8ccbed92c47fbfe8570173c.tar.bz2
Merge branch 'google:main' into feat/qn9090refs/pull/4301/head
Diffstat (limited to 'googletest/test')
-rw-r--r--googletest/test/googletest-output-test-golden-lin.txt16
-rw-r--r--googletest/test/googletest-output-test_.cc6
-rw-r--r--googletest/test/gtest_unittest.cc2
3 files changed, 20 insertions, 4 deletions
diff --git a/googletest/test/googletest-output-test-golden-lin.txt b/googletest/test/googletest-output-test-golden-lin.txt
index 1f24fb7..6ddf822 100644
--- a/googletest/test/googletest-output-test-golden-lin.txt
+++ b/googletest/test/googletest-output-test-golden-lin.txt
@@ -12,7 +12,7 @@ Expected equality of these values:
3
Stack trace: (omitted)
-[==========] Running 89 tests from 42 test suites.
+[==========] Running 90 tests from 43 test suites.
[----------] Global test environment set-up.
FooEnvironment::SetUp() called.
BarEnvironment::SetUp() called.
@@ -967,6 +967,15 @@ Stack trace: (omitted)
googletest-output-test_.cc:#: Skipped
[ SKIPPED ] TestSuiteThatFailsToSetUp.ShouldNotRun
+[----------] 1 test from TestSuiteThatSkipsInSetUp
+googletest-output-test_.cc:#: Skipped
+Skip entire test suite
+Stack trace: (omitted)
+
+[ RUN ] TestSuiteThatSkipsInSetUp.ShouldNotRun
+googletest-output-test_.cc:#: Skipped
+
+[ SKIPPED ] TestSuiteThatSkipsInSetUp.ShouldNotRun
[----------] 1 test from PrintingFailingParams/FailingParamTest
[ RUN ] PrintingFailingParams/FailingParamTest.Fails/0
googletest-output-test_.cc:#: Failure
@@ -1043,10 +1052,11 @@ Failed
Expected fatal failure.
Stack trace: (omitted)
-[==========] 89 tests from 42 test suites ran.
+[==========] 90 tests from 43 test suites ran.
[ PASSED ] 31 tests.
-[ SKIPPED ] 1 test, listed below:
+[ SKIPPED ] 2 tests, listed below:
[ SKIPPED ] TestSuiteThatFailsToSetUp.ShouldNotRun
+[ SKIPPED ] TestSuiteThatSkipsInSetUp.ShouldNotRun
[ FAILED ] 57 tests, listed below:
[ FAILED ] NonfatalFailureTest.EscapesStringOperands
[ FAILED ] NonfatalFailureTest.DiffForLongStrings
diff --git a/googletest/test/googletest-output-test_.cc b/googletest/test/googletest-output-test_.cc
index f1facf5..e3560c0 100644
--- a/googletest/test/googletest-output-test_.cc
+++ b/googletest/test/googletest-output-test_.cc
@@ -1007,6 +1007,12 @@ class TestSuiteThatFailsToSetUp : public testing::Test {
};
TEST_F(TestSuiteThatFailsToSetUp, ShouldNotRun) { std::abort(); }
+class TestSuiteThatSkipsInSetUp : public testing::Test {
+ public:
+ static void SetUpTestSuite() { GTEST_SKIP() << "Skip entire test suite"; }
+};
+TEST_F(TestSuiteThatSkipsInSetUp, ShouldNotRun) { std::abort(); }
+
// The main function.
//
// The idea is to use Google Test to run all the tests we have defined (some
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 77d968a..dd049a0 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -173,7 +173,7 @@ class TestEventListenersAccessor {
}
static void SuppressEventForwarding(TestEventListeners* listeners) {
- listeners->SuppressEventForwarding();
+ listeners->SuppressEventForwarding(true);
}
};