This commit is contained in:
Alexander Nikforov 2022-07-01 13:36:51 -07:00
parent 9cdc144792
commit 2c49f9cb0d
3 changed files with 4 additions and 4 deletions

View file

@ -897,7 +897,7 @@ INSTANTIATE_TEST_SUITE_P(CustomParamNameLambda, CustomLambdaNamingTest,
});
TEST(CustomNamingTest, CheckNameRegistry) {
::testing::UnitTest* unit_test = ::testing::UnitTest::GetInstance().get();
auto unit_test = ::testing::UnitTest::GetInstance().get();
std::set<std::string> test_names;
for (int suite_num = 0; suite_num < unit_test->total_test_suite_count();
++suite_num) {

View file

@ -106,7 +106,7 @@ const int kTypedTests = 1;
// Since tests can be run in any order, the values the accessors that track
// test execution (such as failed_test_count) can not be predicted.
TEST(ApiTest, UnitTestImmutableAccessorsWork) {
UnitTest* unit_test = UnitTest::GetInstance().get();
auto unit_test = UnitTest::GetInstance().get();
ASSERT_EQ(2 + kTypedTestSuites, unit_test->total_test_suite_count());
EXPECT_EQ(1 + kTypedTestSuites, unit_test->test_suite_to_run_count());
@ -224,7 +224,7 @@ TEST(DISABLED_Test, Dummy2) {}
class FinalSuccessChecker : public Environment {
protected:
void TearDown() override {
UnitTest* unit_test = UnitTest::GetInstance().get();
auto unit_test = UnitTest::GetInstance().get();
EXPECT_EQ(1 + kTypedTestSuites, unit_test->successful_test_suite_count());
EXPECT_EQ(3 + kTypedTests, unit_test->successful_test_count());

View file

@ -7703,7 +7703,7 @@ auto* dynamic_test = testing::RegisterTest(
__LINE__, []() -> DynamicUnitTestFixture* { return new DynamicTest; });
TEST(RegisterTest, WasRegistered) {
auto* unittest = testing::UnitTest::GetInstance().get();
auto unittest = testing::UnitTest::GetInstance().get();
for (int i = 0; i < unittest->total_test_suite_count(); ++i) {
auto* tests = unittest->GetTestSuite(i);
if (tests->name() != std::string("DynamicUnitTestFixture")) continue;