summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2016-03-18 17:48:58 +0000
committerJF Bastien <jfb@google.com>2016-03-18 17:48:58 +0000
commit5b5061f0cad610ff12b422ba29a4114a3221654e (patch)
treeff85f05ad0df3c688423c1811b78f02ba5c0f8b3 /libcxx/test
parent4f7994c8cb768a461a4aa8d1acec358c07e0edc8 (diff)
downloadbcm5719-llvm-5b5061f0cad610ff12b422ba29a4114a3221654e.tar.gz
bcm5719-llvm-5b5061f0cad610ff12b422ba29a4114a3221654e.zip
Missing ATOMIC_*_LOCK_FREE tests
Forked from D17951, these tests should have been there but weren't. llvm-svn: 263798
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp
index a975a69a66f..0ace9cfe7ba 100644
--- a/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp
@@ -11,6 +11,7 @@
// <atomic>
+// #define ATOMIC_BOOL_LOCK_FREE unspecified
// #define ATOMIC_CHAR_LOCK_FREE unspecified
// #define ATOMIC_CHAR16_T_LOCK_FREE unspecified
// #define ATOMIC_CHAR32_T_LOCK_FREE unspecified
@@ -19,12 +20,16 @@
// #define ATOMIC_INT_LOCK_FREE unspecified
// #define ATOMIC_LONG_LOCK_FREE unspecified
// #define ATOMIC_LLONG_LOCK_FREE unspecified
+// #define ATOMIC_POINTER_LOCK_FREE unspecified
#include <atomic>
#include <cassert>
int main()
{
+ assert(ATOMIC_BOOL_LOCK_FREE == 0 ||
+ ATOMIC_BOOL_LOCK_FREE == 1 ||
+ ATOMIC_BOOL_LOCK_FREE == 2);
assert(ATOMIC_CHAR_LOCK_FREE == 0 ||
ATOMIC_CHAR_LOCK_FREE == 1 ||
ATOMIC_CHAR_LOCK_FREE == 2);
@@ -49,4 +54,7 @@ int main()
assert(ATOMIC_LLONG_LOCK_FREE == 0 ||
ATOMIC_LLONG_LOCK_FREE == 1 ||
ATOMIC_LLONG_LOCK_FREE == 2);
+ assert(ATOMIC_POINTER_LOCK_FREE == 0 ||
+ ATOMIC_POINTER_LOCK_FREE == 1 ||
+ ATOMIC_POINTER_LOCK_FREE == 2);
}
OpenPOWER on IntegriCloud