From ab7be6e43c878f4192cdac764677304757d95d71 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Tue, 23 Nov 2010 20:47:09 +0000 Subject: Update testsuite strucuture to latest draft llvm-svn: 120054 --- .../thread.mutex.class/lock.pass.cpp | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.mutex.class/lock.pass.cpp (limited to 'libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.mutex.class/lock.pass.cpp') diff --git a/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.mutex.class/lock.pass.cpp b/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.mutex.class/lock.pass.cpp deleted file mode 100644 index 222ebcb084e..00000000000 --- a/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.mutex.class/lock.pass.cpp +++ /dev/null @@ -1,48 +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. -// -//===----------------------------------------------------------------------===// - -// - -// class mutex; - -// void lock(); - -#include -#include -#include -#include - -#include - -std::mutex m; - -typedef std::chrono::system_clock Clock; -typedef Clock::time_point time_point; -typedef Clock::duration duration; -typedef std::chrono::milliseconds ms; -typedef std::chrono::nanoseconds ns; - -void f() -{ - time_point t0 = Clock::now(); - m.lock(); - time_point t1 = Clock::now(); - m.unlock(); - ns d = t1 - t0 - ms(250); - assert(d < ns(2500000)); // within 2.5ms -} - -int main() -{ - m.lock(); - std::thread t(f); - std::this_thread::sleep_for(ms(250)); - m.unlock(); - t.join(); -} -- cgit v1.2.3