MCPcopy Create free account
hub / github.com/cpputest/cpputest / listTestGroupAndCaseNames

Method listTestGroupAndCaseNames

src/CppUTest/TestRegistry.cpp:99–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void TestRegistry::listTestGroupAndCaseNames(TestResult& result)
100{
101 SimpleString groupAndNameList;
102
103 for (UtestShell *test = tests_; test != NULLPTR; test = test->getNext()) {
104 if (testShouldRun(test, result)) {
105 SimpleString groupAndName;
106 groupAndName += "#";
107 groupAndName += test->getGroup();
108 groupAndName += ".";
109 groupAndName += test->getName();
110 groupAndName += "#";
111
112 if (!groupAndNameList.contains(groupAndName)) {
113 groupAndNameList += groupAndName;
114 groupAndNameList += " ";
115 }
116 }
117 }
118
119 groupAndNameList.replace("#", "");
120
121 if (groupAndNameList.endsWith(" "))
122 groupAndNameList = groupAndNameList.subString(0, groupAndNameList.size() - 1);
123 result.print(groupAndNameList.asCharString());
124}
125
126bool TestRegistry::endOfGroup(UtestShell* test)
127{

Callers 2

runAllTestsMethod · 0.80
TESTFunction · 0.80

Calls 10

getGroupMethod · 0.80
containsMethod · 0.80
replaceMethod · 0.80
endsWithMethod · 0.80
subStringMethod · 0.80
asCharStringMethod · 0.80
getNextMethod · 0.45
getNameMethod · 0.45
sizeMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected