mirror of
https://github.com/TartanLlama/expected.git
synced 2025-08-05 03:44:31 +02:00
Add issue 30 test
This commit is contained in:
@@ -43,3 +43,12 @@ TEST_CASE("Issue 29", "[issues.29]") {
|
|||||||
tl::expected<std::vector<foo>, int> ov = std::move(v);
|
tl::expected<std::vector<foo>, int> ov = std::move(v);
|
||||||
REQUIRE(ov->size() == 1);
|
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);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user