{ | { | ||||
REQUIRE_THROWS([] { | REQUIRE_THROWS([] { | ||||
const ThrowOnCopyMock noMove; | const ThrowOnCopyMock noMove; | ||||
REQUIRE_CALL(noMove, deleter()); | |||||
sr::scope_success<decltype(noMove)> guard{noMove}; | sr::scope_success<decltype(noMove)> guard{noMove}; | ||||
}()); | |||||
}()); | |||||
} | } | ||||
TEST_CASE("exit function is not called if released", "[ScopeSuccess]") | TEST_CASE("exit function is not called if released", "[ScopeSuccess]") |