[libcxx] r263798 - Missing ATOMIC_*_LOCK_FREE tests
JF Bastien via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 10:48:58 PDT 2016
Author: jfb
Date: Fri Mar 18 12:48:58 2016
New Revision: 263798
URL: http://llvm.org/viewvc/llvm-project?rev=263798&view=rev
Log:
Missing ATOMIC_*_LOCK_FREE tests
Forked from D17951, these tests should have been there but weren't.
Modified:
libcxx/trunk/test/std/atomics/atomics.lockfree/lockfree.pass.cpp
Modified: libcxx/trunk/test/std/atomics/atomics.lockfree/lockfree.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.lockfree/lockfree.pass.cpp?rev=263798&r1=263797&r2=263798&view=diff
==============================================================================
--- libcxx/trunk/test/std/atomics/atomics.lockfree/lockfree.pass.cpp (original)
+++ libcxx/trunk/test/std/atomics/atomics.lockfree/lockfree.pass.cpp Fri Mar 18 12:48:58 2016
@@ -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);
}
More information about the cfe-commits
mailing list