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/std/thread/thread.threads/thread.thread.class/thread.thread.id | |
| parent | 6012fe9abb1f01b1b5b4ca908464804c21ff8602 (diff) | |
Notes
Diffstat (limited to 'test/std/thread/thread.threads/thread.thread.class/thread.thread.id')
8 files changed, 0 insertions, 249 deletions
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.pass.cpp deleted file mode 100644 index 585f7ea98a03..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/assign.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 - -// <thread> - -// class thread::id - -// id& operator=(const id&) = default; - -#include <thread> -#include <cassert> - -int main() -{ - std::thread::id id0; - std::thread::id id1; - id1 = id0; - assert(id1 == id0); - id1 = std::this_thread::get_id(); - assert(id1 != id0); -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp deleted file mode 100644 index e8c38016b288..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/copy.pass.cpp +++ /dev/null @@ -1,26 +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::id - -// id(const id&) = default; - -#include <thread> -#include <cassert> - -int main() -{ - std::thread::id id0; - std::thread::id id1 = id0; - assert(id1 == id0); -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp deleted file mode 100644 index 0037deb1dd65..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/default.pass.cpp +++ /dev/null @@ -1,25 +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::id - -// id(); - -#include <thread> -#include <cassert> - -int main() -{ - std::thread::id id; - assert(id == std::thread::id()); -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp deleted file mode 100644 index 9799467c4529..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.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 -// UNSUPPORTED: c++98, c++03 - -// <thread> - -// Test that <thread> provides all of the arithmetic, enum, and pointer -// hash specializations. - -#include <thread> - -#include "poisoned_hash_helper.hpp" - -int main() { - test_library_hash_specializations_available(); - { - test_hash_enabled_for_type<std::thread::id>(); - } -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp deleted file mode 100644 index 6dd4c3ec4f57..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp +++ /dev/null @@ -1,32 +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::id - -// bool operator==(thread::id x, thread::id y); -// bool operator!=(thread::id x, thread::id y); - -#include <thread> -#include <cassert> - -int main() -{ - std::thread::id id0; - std::thread::id id1; - id1 = id0; - assert( (id1 == id0)); - assert(!(id1 != id0)); - id1 = std::this_thread::get_id(); - assert(!(id1 == id0)); - assert( (id1 != id0)); -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp deleted file mode 100644 index de52b1d00cdf..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp +++ /dev/null @@ -1,43 +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::id - -// bool operator< (thread::id x, thread::id y); -// bool operator<=(thread::id x, thread::id y); -// bool operator> (thread::id x, thread::id y); -// bool operator>=(thread::id x, thread::id y); - -#include <thread> -#include <cassert> - -int main() -{ - std::thread::id id0; - std::thread::id id1; - std::thread::id id2 = std::this_thread::get_id(); - assert(!(id0 < id1)); - assert( (id0 <= id1)); - assert(!(id0 > id1)); - assert( (id0 >= id1)); - assert(!(id0 == id2)); - if (id0 < id2) { - assert( (id0 <= id2)); - assert(!(id0 > id2)); - assert(!(id0 >= id2)); - } else { - assert(!(id0 <= id2)); - assert( (id0 > id2)); - assert( (id0 >= id2)); - } -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp deleted file mode 100644 index 126965fe3fc3..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.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 - -// <thread> - -// class thread::id - -// template<class charT, class traits> -// basic_ostream<charT, traits>& -// operator<<(basic_ostream<charT, traits>& out, thread::id id); - -#include <thread> -#include <sstream> -#include <cassert> - -int main() -{ - std::thread::id id0 = std::this_thread::get_id(); - std::ostringstream os; - os << id0; -} diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp deleted file mode 100644 index 4f1491decd31..000000000000 --- a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp +++ /dev/null @@ -1,38 +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> - -// template <class T> -// struct hash -// : public unary_function<T, size_t> -// { -// size_t operator()(T val) const; -// }; - -// Not very portable - -#include <thread> -#include <cassert> - -#include "test_macros.h" - -int main() -{ - std::thread::id id1; - std::thread::id id2 = std::this_thread::get_id(); - typedef std::hash<std::thread::id> H; - static_assert((std::is_same<typename H::argument_type, std::thread::id>::value), "" ); - static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" ); - ASSERT_NOEXCEPT(H()(id2)); - H h; - assert(h(id1) != h(id2)); -} |
