diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-06-22 00:21:50 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-06-22 00:21:50 +0000 |
commit | 97e0ba02fdcd5862620179f6d651d47605b301c4 (patch) | |
tree | dc81296382afc07a5e88438364c5b1aada3cf913 /libcxx/test/std/thread/thread.threads/thread.thread.class | |
parent | 803ee03117bbc4996abb9b917f6c558805646ca9 (diff) | |
download | bcm5719-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/thread.threads/thread.thread.class')
-rw-r--r-- | libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp | 54 | ||||
-rw-r--r-- | libcxx/test/std/thread/thread.threads/thread.thread.class/types.pass.cpp | 27 |
2 files changed, 0 insertions, 81 deletions
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), ""); -} |