Change #ifdefs in test to UNSUPPORTED. No functionality change in the tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@239562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4356f6392e
commit
f54ca46a7b
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -19,7 +20,5 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -20,8 +21,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::system_clock Clock;
|
typedef std::chrono::system_clock Clock;
|
||||||
@ -40,15 +39,11 @@ void f()
|
|||||||
assert(d < ms(50)); // within 50ms
|
assert(d < ms(50)); // within 50ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
m.lock();
|
m.lock();
|
||||||
std::thread t(f);
|
std::thread t(f);
|
||||||
std::this_thread::sleep_for(ms(250));
|
std::this_thread::sleep_for(ms(250));
|
||||||
m.unlock();
|
m.unlock();
|
||||||
t.join();
|
t.join();
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -21,8 +22,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::system_clock Clock;
|
typedef std::chrono::system_clock Clock;
|
||||||
@ -51,11 +50,9 @@ void g()
|
|||||||
assert(d < ms(50)); // within 50ms
|
assert(d < ms(50)); // within 50ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
m.lock();
|
m.lock();
|
||||||
std::vector<std::thread> v;
|
std::vector<std::thread> v;
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
@ -73,5 +70,4 @@ int main()
|
|||||||
for (auto& t : v)
|
for (auto& t : v)
|
||||||
t.join();
|
t.join();
|
||||||
q.join();
|
q.join();
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -20,8 +21,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::system_clock Clock;
|
typedef std::chrono::system_clock Clock;
|
||||||
@ -44,15 +43,11 @@ void f()
|
|||||||
assert(d < ms(200)); // within 200ms
|
assert(d < ms(200)); // within 200ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
m.lock();
|
m.lock();
|
||||||
std::thread t(f);
|
std::thread t(f);
|
||||||
std::this_thread::sleep_for(ms(250));
|
std::this_thread::sleep_for(ms(250));
|
||||||
m.unlock();
|
m.unlock();
|
||||||
t.join();
|
t.join();
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -21,8 +22,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::steady_clock Clock;
|
typedef std::chrono::steady_clock Clock;
|
||||||
@ -50,11 +49,8 @@ void f2()
|
|||||||
assert(d < ms(50)); // within 50ms
|
assert(d < ms(50)); // within 50ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
{
|
{
|
||||||
m.lock();
|
m.lock();
|
||||||
std::thread t(f1);
|
std::thread t(f1);
|
||||||
@ -69,5 +65,4 @@ int main()
|
|||||||
m.unlock();
|
m.unlock();
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -21,8 +22,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::system_clock Clock;
|
typedef std::chrono::system_clock Clock;
|
||||||
@ -45,11 +44,8 @@ void f()
|
|||||||
assert(d < ms(200)); // within 200ms
|
assert(d < ms(200)); // within 200ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
m.lock();
|
m.lock();
|
||||||
std::vector<std::thread> v;
|
std::vector<std::thread> v;
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
@ -58,5 +54,4 @@ int main()
|
|||||||
m.unlock();
|
m.unlock();
|
||||||
for (auto& t : v)
|
for (auto& t : v)
|
||||||
t.join();
|
t.join();
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -22,8 +23,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::steady_clock Clock;
|
typedef std::chrono::steady_clock Clock;
|
||||||
@ -51,11 +50,8 @@ void f2()
|
|||||||
assert(d < ms(50)); // within 50ms
|
assert(d < ms(50)); // within 50ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
{
|
{
|
||||||
m.lock();
|
m.lock();
|
||||||
std::vector<std::thread> v;
|
std::vector<std::thread> v;
|
||||||
@ -76,5 +72,4 @@ int main()
|
|||||||
for (auto& t : v)
|
for (auto& t : v)
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -22,8 +23,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
typedef std::chrono::steady_clock Clock;
|
typedef std::chrono::steady_clock Clock;
|
||||||
@ -51,11 +50,8 @@ void f2()
|
|||||||
assert(d < ms(50)); // within 50ms
|
assert(d < ms(50)); // within 50ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
{
|
{
|
||||||
m.lock();
|
m.lock();
|
||||||
std::vector<std::thread> v;
|
std::vector<std::thread> v;
|
||||||
@ -76,5 +72,4 @@ int main()
|
|||||||
for (auto& t : v)
|
for (auto& t : v)
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads
|
// UNSUPPORTED: libcpp-has-no-threads
|
||||||
|
// UNSUPPORTED: c++03, c++98, c++11
|
||||||
|
|
||||||
// <shared_mutex>
|
// <shared_mutex>
|
||||||
|
|
||||||
@ -21,7 +22,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
#include "test_macros.h"
|
||||||
|
|
||||||
std::shared_timed_mutex m;
|
std::shared_timed_mutex m;
|
||||||
|
|
||||||
@ -50,11 +51,8 @@ void f2()
|
|||||||
assert(d < ms(50)); // within 50ms
|
assert(d < ms(50)); // within 50ms
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
|
||||||
{
|
{
|
||||||
m.lock();
|
m.lock();
|
||||||
std::thread t(f1);
|
std::thread t(f1);
|
||||||
@ -69,5 +67,4 @@ int main()
|
|||||||
m.unlock();
|
m.unlock();
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user