summaryrefslogtreecommitdiffstats
path: root/googletest/test/gtest_unittest.cc
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2019-07-31 16:22:29 (GMT)
committerGennadiy Civil <misterg@google.com>2019-08-01 20:05:33 (GMT)
commit2221875d0bc7b835e93d6c562f4879251037fa1f (patch)
tree2e88a388eee7a2b9a38f6c3dfe1f4eb273183816 /googletest/test/gtest_unittest.cc
parent9311242db422dd6f24c8e764847fe5d70d0d4859 (diff)
downloadgoogletest-2221875d0bc7b835e93d6c562f4879251037fa1f.zip
googletest-2221875d0bc7b835e93d6c562f4879251037fa1f.tar.gz
googletest-2221875d0bc7b835e93d6c562f4879251037fa1f.tar.bz2
Googletest export
Internal Change PiperOrigin-RevId: 260939845
Diffstat (limited to 'googletest/test/gtest_unittest.cc')
-rw-r--r--googletest/test/gtest_unittest.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 07ee171..2b00b70 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -2016,10 +2016,11 @@ void ExpectNonFatalFailureRecordingPropertyWithReservedKeyForCurrentTest(
void ExpectNonFatalFailureRecordingPropertyWithReservedKeyForCurrentTestSuite(
const char* key) {
- const TestCase* test_case = UnitTest::GetInstance()->current_test_case();
- ASSERT_TRUE(test_case != nullptr);
+ const testing::TestSuite* test_suite =
+ UnitTest::GetInstance()->current_test_suite();
+ ASSERT_TRUE(test_suite != nullptr);
ExpectNonFatalFailureRecordingPropertyWithReservedKey(
- test_case->ad_hoc_test_result(), key);
+ test_suite->ad_hoc_test_result(), key);
}
void ExpectNonFatalFailureRecordingPropertyWithReservedKeyOutsideOfTestSuite(
@@ -2049,8 +2050,10 @@ class UnitTestRecordPropertyTest :
"time");
Test::RecordProperty("test_case_key_1", "1");
+
const testing::TestSuite* test_suite =
- UnitTest::GetInstance()->current_test_case();
+ UnitTest::GetInstance()->current_test_suite();
+
ASSERT_TRUE(test_suite != nullptr);
ASSERT_EQ(1, test_suite->ad_hoc_test_result().test_property_count());