浏览代码

Prevent unused warning.

main
offa 8 年前
父节点
当前提交
37f6962596
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. +2
    -0
      test/ScopeFailTest.cpp
  2. +2
    -0
      test/ScopeSuccessTest.cpp

+ 2
- 0
test/ScopeFailTest.cpp 查看文件

{ {
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 查看文件

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);
} }
} }



正在加载...
取消
保存