From 51072bd6bf79ef2bc6a922079bff57c31c1effbc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:47:26 +0000 Subject: Vendor import of libc++ release_39 branch r276489: https://llvm.org/svn/llvm-project/libcxx/branches/release_39@276489 --- test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp') diff --git a/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp b/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp index b812e364bbc5..c8b3d98103c4 100644 --- a/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp +++ b/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp @@ -16,12 +16,12 @@ // size_t operator()(T val) const; // }; -// Not very portable - #include #include #include +#include "test_macros.h" + void test(int i) { @@ -31,7 +31,9 @@ test(int i) static_assert((std::is_same::value), "" ); H h; T ec(i, std::system_category()); - assert(h(ec) == i); + const std::size_t result = h(ec); + LIBCPP_ASSERT(result == i); + ((void)result); // Prevent unused warning } int main() -- cgit v1.3