MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / runSelectedModule

Method runSelectedModule

UnitTests/sources/main.cpp:46–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 void runSelectedModule()
47 /// \brief Selection Module function
48 {
49
50 vector<std::string> lTests;
51 PoolTest::PoolTestInstance().getListTests(lTests);
52
53 // Print The list
54 int index = 0;
55 string tmp;
56 for(string& test : lTests)
57 cout << String::Format(tmp, index++, " - ", test) << endl;
58
59 // Ask for the index
60 cout << endl << "Choose the index of the test to run (or type enter to run all) : ";
61 string input;
62 getline(cin, input);
63 Exception ex;
64
65 int number(0);
66 if (!input.empty()) {
67 number = String::ToNumber<int>(ex, input);
68 if (!ex) {
69 PoolTest::PoolTestInstance().run(lTests.at(number),_loop);
70 return;
71 }
72 WARN("Unvalid test index, all tests will run")
73 }
74 PoolTest::PoolTestInstance().runAll(_loop);
75 }
76
77///// MAIN
78 int main() {

Callers

nothing calls this directly

Calls 5

FormatClass · 0.85
getListTestsMethod · 0.80
runAllMethod · 0.80
emptyMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected