浏览代码

Throwing std::exception's instead of plain int's in the tests.

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

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

{ {
REQUIRE_CALL(m, deleter()); REQUIRE_CALL(m, deleter());
[[maybe_unused]] auto guard = sr::scope_fail{deleter}; [[maybe_unused]] auto guard = sr::scope_fail{deleter};
throw 3;
throw std::exception{};
} }
catch( ... ) catch( ... )
{ {
{ {
try try
{ {
throw 3;
throw std::exception{};
} }
catch( ... ) catch( ... )
{ {

+ 2
- 2
test/ScopeSuccessTest.cpp 查看文件

try try
{ {
[[maybe_unused]] auto guard = sr::scope_success{deleter}; [[maybe_unused]] auto guard = sr::scope_success{deleter};
throw 3;
throw std::exception{};
} }
catch( ... ) catch( ... )
{ {
{ {
try try
{ {
throw 3;
throw std::exception{};
} }
catch( ... ) catch( ... )
{ {

正在加载...
取消
保存