diff options
author | misterg <misterg@google.com> | 2019-07-31 16:22:29 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-08-01 20:05:33 (GMT) |
commit | 2221875d0bc7b835e93d6c562f4879251037fa1f (patch) | |
tree | 2e88a388eee7a2b9a38f6c3dfe1f4eb273183816 /googletest/test/gtest_unittest.cc | |
parent | 9311242db422dd6f24c8e764847fe5d70d0d4859 (diff) | |
download | googletest-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.cc | 11 |
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()); |