summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/thread
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-22 00:21:50 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-22 00:21:50 +0000
commit97e0ba02fdcd5862620179f6d651d47605b301c4 (patch)
treedc81296382afc07a5e88438364c5b1aada3cf913 /libcxx/test/std/thread
parent803ee03117bbc4996abb9b917f6c558805646ca9 (diff)
downloadbcm5719-llvm-97e0ba02fdcd5862620179f6d651d47605b301c4.tar.gz
bcm5719-llvm-97e0ba02fdcd5862620179f6d651d47605b301c4.zip
Move native_handle thread tests to test/libcxx
llvm-svn: 273341
Diffstat (limited to 'libcxx/test/std/thread')
-rw-r--r--libcxx/test/std/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp29
-rw-r--r--libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp27
-rw-r--r--libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp27
-rw-r--r--libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp54
-rw-r--r--libcxx/test/std/thread/thread.threads/thread.thread.class/types.pass.cpp27
5 files changed, 0 insertions, 164 deletions
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
deleted file mode 100644
index bf28e01a0e8..00000000000
--- a/libcxx/test/std/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-
-// <condition_variable>
-
-// class condition_variable;
-
-// typedef pthread_cond_t* native_handle_type;
-// native_handle_type native_handle();
-
-#include <condition_variable>
-#include <cassert>
-
-int main()
-{
- static_assert((std::is_same<std::condition_variable::native_handle_type,
- pthread_cond_t*>::value), "");
- std::condition_variable cv;
- std::condition_variable::native_handle_type h = cv.native_handle();
- assert(h != nullptr);
-}
diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
deleted file mode 100644
index 12c80f02c34..00000000000
--- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-
-// <mutex>
-
-// class mutex;
-
-// typedef pthread_mutex_t* native_handle_type;
-// native_handle_type native_handle();
-
-#include <mutex>
-#include <cassert>
-
-int main()
-{
- std::mutex m;
- pthread_mutex_t* h = m.native_handle();
- assert(h);
-}
diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
deleted file mode 100644
index 10626bc4072..00000000000
--- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-
-// <mutex>
-
-// class recursive_mutex;
-
-// typedef pthread_mutex_t* native_handle_type;
-// native_handle_type native_handle();
-
-#include <mutex>
-#include <cassert>
-
-int main()
-{
- std::recursive_mutex m;
- pthread_mutex_t* h = m.native_handle();
- assert(h);
-}
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
deleted file mode 100644
index c8807a965c4..00000000000
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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>
-
-// class thread
-
-// native_handle_type native_handle();
-
-#include <thread>
-#include <new>
-#include <cstdlib>
-#include <cassert>
-
-class G
-{
- int alive_;
-public:
- static int n_alive;
- static bool op_run;
-
- G() : alive_(1) {++n_alive;}
- G(const G& g) : alive_(g.alive_) {++n_alive;}
- ~G() {alive_ = 0; --n_alive;}
-
- void operator()()
- {
- assert(alive_ == 1);
- assert(n_alive >= 1);
- op_run = true;
- }
-};
-
-int G::n_alive = 0;
-bool G::op_run = false;
-
-int main()
-{
- {
- G g;
- std::thread t0(g);
- pthread_t pid = t0.native_handle();
- assert(pid != 0);
- t0.join();
- }
-}
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/types.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/types.pass.cpp
deleted file mode 100644
index a5bf77031cc..00000000000
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/types.pass.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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>
-
-// class thread
-// {
-// public:
-// typedef pthread_t native_handle_type;
-// ...
-// };
-
-#include <thread>
-#include <type_traits>
-
-int main()
-{
- static_assert((std::is_same<std::thread::native_handle_type, pthread_t>::value), "");
-}
OpenPOWER on IntegriCloud