diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:01 +0000 |
| commit | b7332b04df5d50c92640c74cfeb138ecb7e3f7ae (patch) | |
| tree | b1b49faa0cab1482905e0cda6f0ee5d97e3fe08f /test/libcxx/thread/thread.threads/thread.thread.class | |
| parent | 6012fe9abb1f01b1b5b4ca908464804c21ff8602 (diff) | |
Notes
Diffstat (limited to 'test/libcxx/thread/thread.threads/thread.thread.class')
| -rw-r--r-- | test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp | 56 | ||||
| -rw-r--r-- | test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp | 28 |
2 files changed, 0 insertions, 84 deletions
diff --git a/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp deleted file mode 100644 index c818474ba941..000000000000 --- a/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp +++ /dev/null @@ -1,56 +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, libcpp-has-thread-api-external - -// XFAIL: windows - -// <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/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp b/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp deleted file mode 100644 index e801fc46a9e1..000000000000 --- a/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp +++ /dev/null @@ -1,28 +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, libcpp-has-thread-api-external -// REQUIRES: libcpp-has-thread-api-pthread - -// <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), ""); -} |
