Bridge++
Ver. 1.2.x
|
TestManager class for managing and performing tests. More...
#include <testManager.h>
Classes | |
struct | Node |
struct | Stat |
Public Member Functions | |
void | interactive () |
void | batch (const std::string &arg) |
void | batch_recursive (const std::string &arg="") |
void | batch_recursive (const int argc, char **argv) |
bool | registerTest (const std::string &key, const Test_function func) |
int | getCheckPrecision () const |
Static Public Member Functions | |
static TestManager & | Instance () |
static bool | RegisterTest (const std::string &key, const Test_function func) |
Static Public Attributes | |
static const std::string | class_name = "TestManager" |
Private Member Functions | |
TestManager () | |
TestManager (const TestManager &) | |
TestManager & | operator= (const TestManager &) |
~TestManager () | |
Node * | find_node (Node *p, const std::vector< std::string > &v) |
Node * | append_key (Node *p, const std::vector< std::string > &v) |
Node * | append_key (Node *p, int argc, char **argv) |
void | stat_report () const |
std::string | find_fullpath (const Node *p, const std::string &path="") |
void | interactive_master () |
void | interactive_slave () |
void | run (const Node *p) |
void | run_traversal (const Node *p) |
bool | menu (const Node *p, const bool is_top=false) |
void | banner () |
void | set_precision () |
void | traverse (const Node *p, const std::string &indent="") |
Static Private Member Functions | |
static void | CreateInstance () |
Private Attributes | |
Bridge::VerboseLevel | m_vl |
Node | m_root_node |
int | m_precision |
Stat | m_stat |
Static Private Attributes | |
static TestManager * | s_instance = 0 |
TestManager class for managing and performing tests.
TestManager class provides framework for managing and performing various tests. Tests are registered to TestManager, and performed interactively through hierarchical menu, or in a batch mode by specifying test names.
Each test is in a form of a function which takes no argument, and returns status whether the test is successful or not. It is expected that each test is independent with each other, leaving no side effects.
TestManager collects and reports statistics of success/failure of tests when 'all' of the subtree of tests are selected in interactive mode.
N.B. TestManager is a singleton class.
Definition at line 64 of file testManager.h.
|
private |
Definition at line 69 of file testManager.cpp.
|
private |
|
private |
Definition at line 78 of file testManager.cpp.
|
private |
Definition at line 393 of file testManager.cpp.
|
private |
Definition at line 423 of file testManager.cpp.
|
private |
Definition at line 30 of file testManager.cpp.
void TestManager::batch | ( | const std::string & | arg | ) |
Definition at line 126 of file testManager.cpp.
void TestManager::batch_recursive | ( | const std::string & | arg = "" | ) |
Definition at line 139 of file testManager.cpp.
void TestManager::batch_recursive | ( | const int | argc, |
char ** | argv | ||
) |
Definition at line 168 of file testManager.cpp.
|
staticprivate |
Definition at line 60 of file testManager.cpp.
|
private |
Definition at line 449 of file testManager.cpp.
|
private |
Definition at line 367 of file testManager.cpp.
|
inline |
Definition at line 83 of file testManager.h.
|
static |
Definition at line 41 of file testManager.cpp.
void TestManager::interactive | ( | ) |
Definition at line 85 of file testManager.cpp.
|
private |
Definition at line 96 of file testManager.cpp.
|
private |
Definition at line 108 of file testManager.cpp.
|
private |
Definition at line 256 of file testManager.cpp.
|
private |
bool TestManager::registerTest | ( | const std::string & | key, |
const Test_function | func | ||
) |
Definition at line 203 of file testManager.cpp.
|
inlinestatic |
Definition at line 79 of file testManager.h.
|
private |
Definition at line 211 of file testManager.cpp.
|
private |
Definition at line 241 of file testManager.cpp.
|
private |
Definition at line 343 of file testManager.cpp.
|
private |
Definition at line 502 of file testManager.cpp.
|
private |
Definition at line 537 of file testManager.cpp.
|
static |
Definition at line 67 of file testManager.h.
|
private |
Definition at line 159 of file testManager.h.
|
private |
Definition at line 156 of file testManager.h.
|
private |
Definition at line 162 of file testManager.h.
|
private |
Definition at line 154 of file testManager.h.
|
staticprivate |
Definition at line 97 of file testManager.h.