// List the tests // void TestApp::List(Test *test, const string& parent /*=""*/) const { TestSuite *suite = dynamic_cast<TestSuite*>(test); string name; if (suite) { // take the last component of the name and append to the parent name = test->getName(); string::size_type i = name.find_last_of(".:"); if (i != string::npos) name = name.substr(i + 1); name = parent + "." + name; // drop the 1st component from the display and indent if (parent != "") { string::size_type j = i = name.find('.', 1); while ((j = name.find('.', j + 1)) != string::npos) cout << " "; cout << " " << name.substr(i + 1) << "\n"; } typedef vector<Test*> Tests; typedef Tests::const_iterator Iter; const Tests& tests = suite->getTests(); for (Iter it = tests.begin(); it != tests.end(); ++it) List(*it, name); } else if (m_longlist) { string::size_type i = 0; while ((i = parent.find('.', i + 1)) != string::npos) cout << " "; cout << " " << test->getName() << "\n"; } }
// List the tests // void TestApp::List(Test *test, const string& parent /*=""*/) const { TestSuite *suite = dynamic_cast<TestSuite*>(test); string name; if (suite) { // take the last component of the name and append to the parent name = test->getName(); string::size_type i = name.find_last_of(".:"); if (i != string::npos) name = name.substr(i + 1); name = parent + "." + name; // drop the 1st component from the display and indent if (parent != "") { string::size_type j = i = name.find('.', 1); #if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */ # pragma ivdep # pragma swp # pragma unroll # pragma prefetch # if 0 # pragma simd noassert # endif #endif /* VDM auto patch */ while ((j = name.find('.', j + 1)) != string::npos) cout << " "; cout << " " << name.substr(i + 1) << "\n"; } typedef vector<Test*> Tests; typedef Tests::const_iterator Iter; const Tests& tests = suite->getTests(); #if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */ # pragma ivdep # pragma swp # pragma unroll # pragma prefetch # if 0 # pragma simd noassert # endif #endif /* VDM auto patch */ for (Iter it = tests.begin(); it != tests.end(); ++it) List(*it, name); } else if (m_longlist) { string::size_type i = 0; #if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */ # pragma ivdep # pragma swp # pragma unroll # pragma prefetch # if 0 # pragma simd noassert # endif #endif /* VDM auto patch */ while ((i = parent.find('.', i + 1)) != string::npos) cout << " "; cout << " " << test->getName() << "\n"; } }