summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp')
-rw-r--r--libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp
new file mode 100644
index 00000000000..3b4b7823a83
--- /dev/null
+++ b/libcxx/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: libcpp-has-no-threads
+
+// <thread>
+
+// thread::id this_thread::get_id();
+
+#include <thread>
+#include <cassert>
+
+int main()
+{
+ std::thread::id id = std::this_thread::get_id();
+ assert(id != std::thread::id());
+}
OpenPOWER on IntegriCloud