MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / CHECK_RUNTIME_ERROR_CONTAINS

Function CHECK_RUNTIME_ERROR_CONTAINS

tests/BenchmarkArgs.cpp:19–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using namespace openshot::benchmark;
18
19static 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
31TEST_CASE("Benchmark usage string includes new thread flags", "[benchmark][args]") {
32 const std::string usage = BenchmarkUsage();

Callers 1

BenchmarkArgs.cppFile · 0.85

Calls 2

ParseBenchmarkOptionsFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected