MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / getGroupFromPathName

Method getGroupFromPathName

deps/physx/physx/samples/samplebase/TestGroup.cpp:106–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106Test::TestGroup* Test::TestGroup::getGroupFromPathName(const char* pathName, bool omitRoot)
107{
108 if (!omitRoot || getParent())
109 {
110 if (strstr(pathName, getName()) != pathName)
111 return NULL;
112
113 pathName += strlen(getName());
114
115 if (getFirstChild())
116 {
117 if (strstr(pathName, "/") != pathName)
118 return NULL;
119
120 pathName += strlen("/");
121 }
122 else
123 {
124 if (pathName[0] == '\0')
125 return this;
126 else
127 return NULL;
128 }
129 }
130
131 for (unsigned i = 0; i < mChildren.size(); ++i)
132 {
133 TestGroup* group = mChildren[i]->getGroupFromPathName(pathName, omitRoot);
134 if (group)
135 return group;
136 }
137 return NULL;
138}
139
140void Test::TestGroup::addTest(SampleCreator test, const char* name, size_t count)
141{

Callers

nothing calls this directly

Calls 2

getNameFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected