| 17 | using namespace openshot::benchmark; |
| 18 | |
| 19 | static void CHECK_RUNTIME_ERROR_CONTAINS(const std::vector<std::string>& args, |
| 20 | const std::string& expected_fragment) { |
| 21 | try { |
| 22 | (void) ParseBenchmarkOptions(args); |
| 23 | FAIL("Expected ParseBenchmarkOptions() to throw std::runtime_error"); |
| 24 | } catch (const std::runtime_error& e) { |
| 25 | CHECK(std::string(e.what()).find(expected_fragment) != std::string::npos); |
| 26 | } catch (...) { |
| 27 | FAIL("Expected std::runtime_error"); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | TEST_CASE("Benchmark usage string includes new thread flags", "[benchmark][args]") { |
| 32 | const std::string usage = BenchmarkUsage(); |
no test coverage detected