void TestRegistry::listTestGroupAndCaseNames(TestResult& result) { SimpleString groupAndNameList; for (UtestShell *test = tests_; test != NULL; test = test->getNext()) { if (testShouldRun(test, result)) { SimpleString groupAndName; groupAndName += "#"; groupAndName += test->getGroup(); groupAndName += "."; groupAndName += test->getName(); groupAndName += "#"; if (!groupAndNameList.contains(groupAndName)) { groupAndNameList += groupAndName; groupAndNameList += " "; } } } groupAndNameList.replace("#", ""); if (groupAndNameList.endsWith(" ")) groupAndNameList = groupAndNameList.subString(0, groupAndNameList.size() - 1); result.print(groupAndNameList.asCharString()); }
bool MemoryReporterPlugin::parseArguments(int /* ac */, const char** av, int index) { SimpleString argument (av[index]); if (argument.contains("-pmemoryreport=")) { argument.replace("-pmemoryreport=", ""); destroyMemoryFormatter(formatter_); formatter_ = createMemoryFormatter(argument); return true; } return false; }
bool TestFilter::match(const SimpleString& name) const { if (strictMatching_) return name == filter_; return name.contains(filter_); }