From 0dc0969cd0a732760f0aa79942a04e0eaef297c4 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:03:23 +0000 Subject: Vendor import of libc++ trunk r300422: https://llvm.org/svn/llvm-project/libcxx/trunk@300422 --- .../thread.thread.id/enabled_hashes.pass.cpp | 27 ++++++++++++++++++++++ .../thread.thread.id/thread_id.pass.cpp | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp (limited to 'test/std/thread/thread.threads/thread.thread.class/thread.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 new file mode 100644 index 000000000000..9799467c4529 --- /dev/null +++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/enabled_hashes.pass.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// 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 + +// + +// Test that provides all of the arithmetic, enum, and pointer +// hash specializations. + +#include + +#include "poisoned_hash_helper.hpp" + +int main() { + test_library_hash_specializations_available(); + { + test_hash_enabled_for_type(); + } +} 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 index 106c69e2e4a1..4f1491decd31 100644 --- 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 @@ -9,7 +9,7 @@ // // UNSUPPORTED: libcpp-has-no-threads -// +// // template // struct hash @@ -23,6 +23,8 @@ #include #include +#include "test_macros.h" + int main() { std::thread::id id1; @@ -30,6 +32,7 @@ int main() typedef std::hash H; static_assert((std::is_same::value), "" ); static_assert((std::is_same::value), "" ); + ASSERT_NOEXCEPT(H()(id2)); H h; assert(h(id1) != h(id2)); } -- cgit v1.3