This commit is contained in:
Sebastian Messmer 2018-12-25 07:45:10 +01:00
parent 9aa0dbfc19
commit 70a25d2cb0

View File

@ -98,9 +98,11 @@ std::vector<std::function<void(either<Left, Right>&)>> EXPECT_IS_RIGHT(const Rig
}, [&] (auto& obj) { }, [&] (auto& obj) {
EXPECT_ANY_THROW(std::move(obj).left()); EXPECT_ANY_THROW(std::move(obj).left());
}, [&] (auto& obj) { }, [&] (auto& obj) {
EXPECT_EQ(expected, obj.right_opt().value()); auto a = obj.right_opt();
EXPECT_EQ(expected, a.value());
}, [&] (auto& obj) { }, [&] (auto& obj) {
EXPECT_EQ(expected, std::move(obj).right_opt().value()); auto a = std::move(obj).right_opt();
EXPECT_EQ(expected, a.value());
}, [&] (auto& obj) { }, [&] (auto& obj) {
EXPECT_EQ(boost::none, obj.left_opt()); EXPECT_EQ(boost::none, obj.left_opt());
}, [&] (auto& obj) { }, [&] (auto& obj) {