[PATCH] D35732: Update system_error tests for more platforms.
Dan Albert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 13:16:49 PDT 2017
danalbert created this revision.
Old versions of Android used the "Unknown error: -1" format.
Repository:
rL LLVM
https://reviews.llvm.org/D35732
Files:
test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
Index: test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
===================================================================
--- test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -31,7 +31,9 @@
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 varries by platform.
+ LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error" ||
+ msg == "Unknown error: -1");
assert(errno == E2BIG);
}
Index: test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
===================================================================
--- test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
+++ test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
@@ -31,7 +31,9 @@
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 == "Unknown error -1" || msg == "Unknown error" ||
+ msg == "Unknown error: -1");
assert(errno == E2BIG);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35732.107704.patch
Type: text/x-patch
Size: 1657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170721/91e6ba42/attachment.bin>
More information about the cfe-commits
mailing list