]> sigrok.org Git - libsigrokflow.git/commitdiff
tests/init: Multiple Srf::deinit() calls should throw.
authorUwe Hermann <redacted>
Tue, 8 Jan 2019 22:29:37 +0000 (23:29 +0100)
committerUwe Hermann <redacted>
Tue, 8 Jan 2019 23:57:10 +0000 (00:57 +0100)
tests/init.cpp

index 7dbd8d54ed2b409533f47755f06ba4cae0f4fc91..f8f206abbcc505840fc7852e66528cdc7d5f2fa7 100644 (file)
@@ -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());