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

Function require_throws

tests/unittests/test_subtitle_formatter.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void require_throws(const std::function<void()> & fn, const std::string & label) {
23 bool threw = false;
24 try {
25 fn();
26 } catch (const std::runtime_error &) {
27 threw = true;
28 }
29 engine::test::require(threw, label + " did not throw");
30}
31
32void test_formats_srt_timecodes_and_text() {
33 engine::text::SubtitleFormatOptions options;

Callers 1

Calls 1

requireFunction · 0.70

Tested by

no test coverage detected