Add issue 30 test

This commit is contained in:
Simon Brand
2018-08-22 13:47:12 +01:00
parent fa6af33347
commit 266bd8f18d

View File

@@ -43,3 +43,12 @@ TEST_CASE("Issue 29", "[issues.29]") {
tl::expected<std::vector<foo>, int> ov = std::move(v);
REQUIRE(ov->size() == 1);
}
tl::expected<int, std::string> error() {
return tl::make_unexpected(std::string("error1 "));
}
std::string maperror(std::string s) { return s + "maperror "; }
TEST_CASE("Issue 30", "[issues.30]") {
error().map_error(maperror);
}