MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / require_throws

Function require_throws

tests/unittests/test_audio_chunking.cpp:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void require_throws(const std::function<void()> & fn, const std::string & label) {
75 bool threw = false;
76 try {
77 fn();
78 } catch (const std::runtime_error &) {
79 threw = true;
80 }
81 engine::test::require(threw, label + " did not throw");
82}
83
84void require_chunk_invariants(
85 const std::vector<engine::runtime::TimeSpan> & chunks,

Calls 1

requireFunction · 0.70

Tested by

no test coverage detected