errno = E2BIG; // something that message will never generate
const std::error_category& e_cat1 = std::generic_category();
const std::string msg = e_cat1.message(-1);
- // Exact message format varies by platform.
- LIBCPP_ASSERT(msg.starts_with("Unknown error"));
+ LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
assert(errno == E2BIG);
}
errno = E2BIG; // something that message will never generate
const std::error_category& e_cat1 = std::system_category();
const std::string msg = e_cat1.message(-1);
- // Exact message format varies by platform.
- LIBCPP_ASSERT(msg.starts_with("Unknown error"));
+ LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
assert(errno == E2BIG);
}