Sfoglia il codice sorgente

Prevent unused warning.

main
offa 7 anni fa
parent
commit
37f6962596
2 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +2
    -0
      test/ScopeFailTest.cpp
  2. +2
    -0
      test/ScopeSuccessTest.cpp

+ 2
- 0
test/ScopeFailTest.cpp Vedi File

{ {
REQUIRE_CALL(m, deleter()); REQUIRE_CALL(m, deleter());
auto guard = sr::make_scope_fail(deleter); auto guard = sr::make_scope_fail(deleter);
static_cast<void>(guard);
throw 3; throw 3;
} }
catch( ... ) catch( ... )
catch( ... ) catch( ... )
{ {
auto guard = sr::make_scope_fail(deleter); auto guard = sr::make_scope_fail(deleter);
static_cast<void>(guard);
} }
} }



+ 2
- 0
test/ScopeSuccessTest.cpp Vedi File

try try
{ {
auto guard = sr::make_scope_success(deleter); auto guard = sr::make_scope_success(deleter);
static_cast<void>(guard);
throw 3; throw 3;
} }
catch( ... ) catch( ... )
{ {
REQUIRE_CALL(m, deleter()); REQUIRE_CALL(m, deleter());
auto guard = sr::make_scope_success(deleter); auto guard = sr::make_scope_success(deleter);
static_cast<void>(guard);
} }
} }



Loading…
Annulla
Salva