forked from OSchip/llvm-project
Revert "Revert "Update system_error tests for more platforms.""
This time using old fashioned starts_with.
This reverts commit d4a8c3f251
.
This commit is contained in:
parent
478b06e687
commit
adefcc8ab5
|
@ -31,7 +31,8 @@ void test_message_for_bad_value() {
|
|||
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);
|
||||
LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
|
||||
// Exact message format varies by platform.
|
||||
LIBCPP_ASSERT(msg.rfind("Unknown error", 0) == 0);
|
||||
assert(errno == E2BIG);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@ void test_message_for_bad_value() {
|
|||
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);
|
||||
LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
|
||||
// Exact message format varies by platform.
|
||||
LIBCPP_ASSERT(msg.rfind("Unknown error", 0) == 0);
|
||||
assert(errno == E2BIG);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue