Pārlūkot izejas kodu

Prevent unused warning.

main
offa pirms 7 gadiem
vecāks
revīzija
37f6962596
2 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. +2
    -0
      test/ScopeFailTest.cpp
  2. +2
    -0
      test/ScopeSuccessTest.cpp

+ 2
- 0
test/ScopeFailTest.cpp Parādīt failu

@@ -163,6 +163,7 @@ TEST_CASE("deleter called on exception", "[ScopeFail]")
{
REQUIRE_CALL(m, deleter());
auto guard = sr::make_scope_fail(deleter);
static_cast<void>(guard);
throw 3;
}
catch( ... )
@@ -179,6 +180,7 @@ TEST_CASE("deleter not called on pending exception", "[ScopeFail]")
catch( ... )
{
auto guard = sr::make_scope_fail(deleter);
static_cast<void>(guard);
}
}


+ 2
- 0
test/ScopeSuccessTest.cpp Parādīt failu

@@ -160,6 +160,7 @@ TEST_CASE("deleter not called on exception", "[ScopeFail]")
try
{
auto guard = sr::make_scope_success(deleter);
static_cast<void>(guard);
throw 3;
}
catch( ... )
@@ -177,6 +178,7 @@ TEST_CASE("deleter called on pending exception", "[ScopeFail]")
{
REQUIRE_CALL(m, deleter());
auto guard = sr::make_scope_success(deleter);
static_cast<void>(guard);
}
}


Notiek ielāde…
Atcelt
Saglabāt