Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::UnitTestHelper Class Reference

Static Public Member Functions

static TestCase const ** GetSortedTestCases ()
 
static const TestCaseFindTestCase (const char *name)
 
static TestInfo const ** GetSortedTests (const TestCase *test_case)
 

Detailed Description

Definition at line 53 of file gtest-unittest-api_test.cc.

Member Function Documentation

◆ FindTestCase()

static const TestCase * testing::internal::UnitTestHelper::FindTestCase ( const char * name)
inlinestatic

Definition at line 73 of file gtest-unittest-api_test.cc.

73 {
74 UnitTest& unit_test = *UnitTest::GetInstance();
75 for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
76 const TestCase* test_case = unit_test.GetTestCase(i);
77 if (0 == strcmp(test_case->name(), name))
78 return test_case;
79 }
80 return NULL;
81 }
std::string name
static UnitTest * GetInstance()
Definition gtest.cc:4374
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSortedTestCases()

static TestCase const ** testing::internal::UnitTestHelper::GetSortedTestCases ( )
inlinestatic

Definition at line 57 of file gtest-unittest-api_test.cc.

57 {
58 UnitTest& unit_test = *UnitTest::GetInstance();
59 TestCase const** const test_cases =
60 new const TestCase*[unit_test.total_test_case_count()];
61
62 for (int i = 0; i < unit_test.total_test_case_count(); ++i)
63 test_cases[i] = unit_test.GetTestCase(i);
64
65 std::sort(test_cases,
66 test_cases + unit_test.total_test_case_count(),
67 LessByName<TestCase>());
68 return test_cases;
69 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSortedTests()

static TestInfo const ** testing::internal::UnitTestHelper::GetSortedTests ( const TestCase * test_case)
inlinestatic

Definition at line 86 of file gtest-unittest-api_test.cc.

86 {
87 TestInfo const** const tests =
88 new const TestInfo*[test_case->total_test_count()];
89
90 for (int i = 0; i < test_case->total_test_count(); ++i)
91 tests[i] = test_case->GetTestInfo(i);
92
93 std::sort(tests, tests + test_case->total_test_count(),
94 LessByName<TestInfo>());
95 return tests;
96 }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: