summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp')
-rw-r--r--libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp
new file mode 100644
index 00000000000..6a60f50f410
--- /dev/null
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.observers/message.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <system_error>
+
+// class error_condition
+
+// string message() const;
+
+#include <system_error>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ const std::error_condition ec(6, std::generic_category());
+ assert(ec.message() == std::generic_category().message(6));
+}
OpenPOWER on IntegriCloud