| @@ -3,7 +3,7 @@ | |||
| #include <utility> | |||
| namespace guards | |||
| namespace sg | |||
| { | |||
| template<class Deleter> | |||
| @@ -2,14 +2,12 @@ | |||
| #include "scope_guard.h" | |||
| #include <catch.hpp> | |||
| using namespace guards; | |||
| TEST_CASE("deleter called on destruction", "[ScopeGuard]") | |||
| { | |||
| bool executed = false; | |||
| { | |||
| auto guard = scope_guard([&executed] { executed = true; }); | |||
| auto guard = sg::scope_guard([&executed] { executed = true; }); | |||
| static_cast<void>(guard); | |||
| } | |||