summaryrefslogtreecommitdiff
path: root/test/std/thread
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-20 21:21:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-20 21:21:10 +0000
commit1c3313bd0215c89fb38710a1ea0762ccf32e859c (patch)
tree65e6d33ca6254b41a8f4230edff47c5344dbd019 /test/std/thread
parent0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff)
Notes
Diffstat (limited to 'test/std/thread')
-rw-r--r--test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp4
-rw-r--r--test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp4
-rw-r--r--test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp17
-rw-r--r--test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp3
4 files changed, 13 insertions, 15 deletions
diff --git a/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp b/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
index 245c480885b83..a0071cd6594e4 100644
--- a/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
@@ -188,7 +188,7 @@ int main()
}
}
#endif
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
{
L0 l0;
L0 l1;
@@ -518,5 +518,5 @@ int main()
}
}
#endif // TEST_HAS_NO_EXCEPTIONS
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // TEST_STD_VER >= 11
}
diff --git a/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp b/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
index fb563cbe0b141..4ad7a3ac28531 100644
--- a/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
@@ -126,7 +126,7 @@ int main()
}
}
#endif
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
{
L0 l0;
L0 l1;
@@ -522,5 +522,5 @@ int main()
assert(!l2.locked());
assert(!l3.locked());
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // TEST_STD_VER >= 11
}
diff --git a/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp b/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
index 138b657196da0..dfd2f10b79e24 100644
--- a/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
@@ -66,7 +66,7 @@ void f3()
#endif
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
struct init1
{
@@ -101,7 +101,7 @@ void f2()
std::call_once(flg2, init2(), 4, 5);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // TEST_STD_VER >= 11
std::once_flag flg41;
std::once_flag flg42;
@@ -135,7 +135,7 @@ void f42()
std::call_once(flg41, init41);
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
class MoveOnly
{
@@ -174,7 +174,6 @@ public:
void operator()(int&) {}
};
-#if TEST_STD_VER >= 11
// reference qualifiers on functions are a C++11 extension
struct RefQual
{
@@ -185,8 +184,8 @@ struct RefQual
void operator()() & { ++lv_called; }
void operator()() && { ++rv_called; }
};
-#endif
-#endif
+
+#endif // TEST_STD_VER >= 11
int main()
{
@@ -218,7 +217,7 @@ int main()
assert(init41_called == 1);
assert(init42_called == 1);
}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#if TEST_STD_VER >= 11
// check functors with 1 arg
{
std::thread t0(f1);
@@ -245,7 +244,6 @@ int main()
int i = 0;
std::call_once(f, NonCopyable(), i);
}
-#if TEST_STD_VER >= 11
// reference qualifiers on functions are a C++11 extension
{
std::once_flag f1, f2;
@@ -255,6 +253,5 @@ int main()
std::call_once(f2, std::move(rq));
assert(rq.rv_called == 1);
}
-#endif
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // TEST_STD_VER >= 11
}
diff --git a/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp b/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp
index 6995f0648335c..21011ed17cd96 100644
--- a/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp
+++ b/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp
@@ -14,13 +14,14 @@
// constexpr once_flag() noexcept;
#include <mutex>
+#include "test_macros.h"
int main()
{
{
std::once_flag f;
}
-#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER >= 11
{
constexpr std::once_flag f;
}