| 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() { |
nothing calls this directly
no test coverage detected