[PATCH] D35732: Update system_error tests for more platforms.
Dan Albert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 12 17:43:30 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa9740ff1585a: Update system_error tests for more platforms. (authored by danalbert).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D35732/new/
https://reviews.llvm.org/D35732
Files:
libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
Index: libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
===================================================================
--- libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -31,7 +31,8 @@
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.starts_with("Unknown error"));
assert(errno == E2BIG);
}
Index: libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
===================================================================
--- libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
+++ libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
@@ -31,7 +31,8 @@
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.starts_with("Unknown error"));
assert(errno == E2BIG);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35732.250111.patch
Type: text/x-patch
Size: 1562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200313/6323d84c/attachment.bin>
More information about the cfe-commits
mailing list