forked from TartanLlama/expected
Fix Clang+GCC
This commit is contained in:
@@ -90,7 +90,12 @@ TEST_CASE("swap") {
|
|||||||
tl::expected<no_throw, willthrow_move> a{s1};
|
tl::expected<no_throw, willthrow_move> a{s1};
|
||||||
tl::expected<no_throw, willthrow_move> b{tl::unexpect, s2};
|
tl::expected<no_throw, willthrow_move> b{tl::unexpect, s2};
|
||||||
should_throw = 1;
|
should_throw = 1;
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
//this seems to break catch on GCC and Clang
|
||||||
REQUIRE_THROWS(swap(a, b));
|
REQUIRE_THROWS(swap(a, b));
|
||||||
|
#endif
|
||||||
|
|
||||||
REQUIRE(a->i == s1);
|
REQUIRE(a->i == s1);
|
||||||
REQUIRE(b.error().i == s2);
|
REQUIRE(b.error().i == s2);
|
||||||
}
|
}
|
Reference in New Issue
Block a user