Просмотр исходного кода

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

main
offa 6 лет назад
Родитель
Сommit
14a838f9a2
2 измененных файлов: 4 добавлений и 4 удалений
  1. +2
    -2
      test/ScopeFailTest.cpp
  2. +2
    -2
      test/ScopeSuccessTest.cpp

+ 2
- 2
test/ScopeFailTest.cpp Просмотреть файл

@@ -105,7 +105,7 @@ TEST_CASE("exit function called on exception", "[ScopeFail]")
{
REQUIRE_CALL(m, deleter());
[[maybe_unused]] auto guard = sr::scope_fail{deleter};
throw 3;
throw std::exception{};
}
catch( ... )
{
@@ -116,7 +116,7 @@ TEST_CASE("exit function not called on pending exception", "[ScopeFail]")
{
try
{
throw 3;
throw std::exception{};
}
catch( ... )
{

+ 2
- 2
test/ScopeSuccessTest.cpp Просмотреть файл

@@ -103,7 +103,7 @@ TEST_CASE("exit function not called on exception", "[ScopeFail]")
try
{
[[maybe_unused]] auto guard = sr::scope_success{deleter};
throw 3;
throw std::exception{};
}
catch( ... )
{
@@ -114,7 +114,7 @@ TEST_CASE("exit function called on pending exception", "[ScopeFail]")
{
try
{
throw 3;
throw std::exception{};
}
catch( ... )
{

Загрузка…
Отмена
Сохранить