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.this | |
| parent | 6012fe9abb1f01b1b5b4ca908464804c21ff8602 (diff) | |
Notes
Diffstat (limited to 'test/std/thread/thread.threads/thread.thread.this')
4 files changed, 0 insertions, 101 deletions
diff --git a/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp b/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp deleted file mode 100644 index 3b4b7823a831..000000000000 --- a/test/std/thread/thread.threads/thread.thread.this/get_id.pass.cpp +++ /dev/null @@ -1,23 +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> - -// thread::id this_thread::get_id(); - -#include <thread> -#include <cassert> - -int main() -{ - std::thread::id id = std::this_thread::get_id(); - assert(id != std::thread::id()); -} diff --git a/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp b/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp deleted file mode 100644 index 3406fff70610..000000000000 --- a/test/std/thread/thread.threads/thread.thread.this/sleep_for_tested_elsewhere.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// <thread> - -// template <class Rep, class Period> -// void sleep_for(const chrono::duration<Rep, Period>& rel_time); - -// The std::this_thread::sleep_for test requires POSIX specific headers and -// is therefore non-standard. For this reason the test lives under the 'libcxx' -// subdirectory. - -int main() -{ -} diff --git a/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp b/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp deleted file mode 100644 index 0a5a3e419d56..000000000000 --- a/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp +++ /dev/null @@ -1,34 +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 -// FLAKY_TEST. - -// <thread> - -// template <class Clock, class Duration> -// void sleep_until(const chrono::time_point<Clock, Duration>& abs_time); - -#include <thread> -#include <cstdlib> -#include <cassert> - -int main() -{ - typedef std::chrono::system_clock Clock; - typedef Clock::time_point time_point; - std::chrono::milliseconds ms(500); - time_point t0 = Clock::now(); - std::this_thread::sleep_until(t0 + ms); - time_point t1 = Clock::now(); - std::chrono::nanoseconds ns = (t1 - t0) - ms; - std::chrono::nanoseconds err = 5 * ms / 100; - // The time slept is within 5% of 500ms - assert(std::abs(ns.count()) < err.count()); -} diff --git a/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp b/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp deleted file mode 100644 index daf5b0cf7abf..000000000000 --- a/test/std/thread/thread.threads/thread.thread.this/yield.pass.cpp +++ /dev/null @@ -1,22 +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> - -// void this_thread::yield(); - -#include <thread> -#include <cassert> - -int main() -{ - std::this_thread::yield(); -} |
