From: Uwe Hermann Date: Tue, 8 Jan 2019 22:29:37 +0000 (+0100) Subject: tests/init: Multiple Srf::deinit() calls should throw. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7c7d0bc87f8b05188016ccfa8abd94de07616c05;p=libsigrokflow.git tests/init: Multiple Srf::deinit() calls should throw. --- diff --git a/tests/init.cpp b/tests/init.cpp index 7dbd8d5..f8f206a 100644 --- a/tests/init.cpp +++ b/tests/init.cpp @@ -34,6 +34,11 @@ TEST_CASE("init/deinit", "[init]") SECTION("Srf::deinit() should not throw") { CHECK_NOTHROW(Srf::deinit()); } + SECTION("Multiple Srf::deinit() calls should throw") { + CHECK_NOTHROW(Srf::deinit()); + for (int i = 0; i < 10; ++i) + CHECK_THROWS(Srf::deinit()); + } } REQUIRE_NOTHROW(Gst::deinit());