From 3f6453cd59ac8d9084ef5890246eca9c7df8bef1 Mon Sep 17 00:00:00 2001 From: Tyler Dauwalder Date: Wed, 24 Jul 2002 00:12:02 +0000 Subject: [PATCH] Added v4 verbosity level git-svn-id: file:///srv/svn/repos/haiku/trunk/current@414 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/tools/cppunit/TestShell.h | 2 +- src/tools/cppunit/TestShell.cpp | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/headers/tools/cppunit/TestShell.h b/headers/tools/cppunit/TestShell.h index 10a5bb808f..920e8255dc 100644 --- a/headers/tools/cppunit/TestShell.h +++ b/headers/tools/cppunit/TestShell.h @@ -59,7 +59,7 @@ public: int Run(int argc, char *argv[]); // Verbosity Level enumeration and accessor function - enum VerbosityLevel { v0, v1, v2, v3 }; + enum VerbosityLevel { v0, v1, v2, v3, v4 }; VerbosityLevel Verbosity() const; // Returns true if verbosity is high enough that individual tests are diff --git a/src/tools/cppunit/TestShell.cpp b/src/tools/cppunit/TestShell.cpp index 142e0763a7..922f4164d6 100644 --- a/src/tools/cppunit/TestShell.cpp +++ b/src/tools/cppunit/TestShell.cpp @@ -42,11 +42,15 @@ BTestShell::AddSuite(BTestSuite *suite) { fSuites[suite->getName()] = suite; // Add its tests + bool first = true; const TestMap &map = suite->getTests(); for (TestMap::const_iterator i = map.begin(); i != map.end(); - i++) + i++) { AddTest(i->first, i->second); + if (Verbosity() >= v4 && i->second) + cout << " " << i->first << endl; + } return B_OK; } else @@ -213,8 +217,10 @@ BTestShell::PrintValidArguments() { cout << indent << "-v1 Sets verbosity level to 1 (complete summary only)" << endl; cout << indent << "-v2 Sets verbosity level to 2 (*default* -- per-test results plus" << endl; cout << indent << " complete summary)" << endl; - cout << indent << "-v3 Sets verbosity level to 3 (dynamic loading information, per-test " << endl; - cout << indent << " results and timing info, plus complete summary)" << endl; + cout << indent << "-v3 Sets verbosity level to 3 (partial dynamic loading information, " << endl; + cout << indent << " per-test results and timing info, plus complete summary)" << endl; + cout << indent << "-v4 Sets verbosity level to 4 (complete dynamic loading information, " << endl; + cout << indent << " per-test results and timing info, plus complete summary)" << endl; cout << indent << "NAME Instructs the program to run the test for the given class or all" << endl; cout << indent << " the tests for the given suite. If some bonehead adds both a class" << endl; cout << indent << " and a suite with the same name, the suite will be run, not the class" << endl; @@ -270,21 +276,18 @@ BTestShell::ProcessArgument(std::string arg, int argc, char *argv[]) { PrintDescription(argc, argv); PrintHelp(); return false; - } - else if (arg == "--list") { + } else if (arg == "--list") { fListTestsAndExit = true; - } - else if (arg == "-v0") { + } else if (arg == "-v0") { fVerbosityLevel = v0; - } - else if (arg == "-v1") { + } else if (arg == "-v1") { fVerbosityLevel = v1; - } - else if (arg == "-v2") { + } else if (arg == "-v2") { fVerbosityLevel = v2; - } - else if (arg == "-v3") { + } else if (arg == "-v3") { fVerbosityLevel = v3; + } else if (arg == "-v4") { + fVerbosityLevel = v4; } else if (arg.length() >= 2 && arg[0] == '-' && arg[1] == 'l') { fLibDirs.insert(arg.substr(2, arg.size()-2)); } else {