| 82 | } |
| 83 | |
| 84 | void Test::TestGroup::getPathName(char* strBuffer, unsigned strBufferMaxLength, bool omitRoot) |
| 85 | { |
| 86 | SampleArray<TestGroup*> path; |
| 87 | getPath(path); |
| 88 | |
| 89 | unsigned charCount = 1; //\0 |
| 90 | for (unsigned i = omitRoot ? 1 : 0; i < path.size(); ++i) |
| 91 | { |
| 92 | const TestGroup& node = *path[i]; |
| 93 | |
| 94 | unsigned nodeNameLength = unsigned(strlen(node.getName())); |
| 95 | if (node.getFirstChild()) |
| 96 | nodeNameLength += 1; |
| 97 | |
| 98 | if (charCount + nodeNameLength < strBufferMaxLength) |
| 99 | { |
| 100 | sprintf(strBuffer + (charCount - 1), "%s%s", node.getName(), node.getFirstChild() ? "/" : ""); |
| 101 | charCount += nodeNameLength; |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | Test::TestGroup* Test::TestGroup::getGroupFromPathName(const char* pathName, bool omitRoot) |
| 107 | { |
no test coverage detected