Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: tests/toolchain/synchronization_cpp11.cc

Issue 639113003: Add nacl-clang testing to SCons (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tests/threads/race_test.c ('K') | « tests/toolchain/nacl.scons ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/toolchain/synchronization_cpp11.cc
diff --git a/tests/toolchain/synchronization_cpp11.cc b/tests/toolchain/synchronization_cpp11.cc
index 9f26a717954075ecd62ab8e46f9d63966ae55593..4a127a56c3827580e8fad07e62c1e137a3237f6b 100644
--- a/tests/toolchain/synchronization_cpp11.cc
+++ b/tests/toolchain/synchronization_cpp11.cc
@@ -46,6 +46,7 @@
* lock-free: we can't guarantee that all our platforms are lock-free.
*/
void test_lock_free_macros() {
+#if defined(__pnacl__)
static_assert(ATOMIC_BOOL_LOCK_FREE == 1, "should be compile-time 1");
static_assert(ATOMIC_CHAR_LOCK_FREE == 1, "should be compile-time 1");
static_assert(ATOMIC_CHAR16_T_LOCK_FREE == 1, "should be compile-time 1");
@@ -56,6 +57,18 @@ void test_lock_free_macros() {
static_assert(ATOMIC_LONG_LOCK_FREE == 1, "should be compile-time 1");
static_assert(ATOMIC_LLONG_LOCK_FREE == 1, "should be compile-time 1");
static_assert(ATOMIC_POINTER_LOCK_FREE == 1, "should be compile-time 1");
+#elif defined(__x86_64__) || defined(__i386__) || defined(__arm__)
+ static_assert(ATOMIC_BOOL_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_CHAR_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_CHAR16_T_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_CHAR32_T_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_WCHAR_T_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_SHORT_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_INT_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_LONG_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_LLONG_LOCK_FREE == 2, "should be compile-time 2");
+ static_assert(ATOMIC_POINTER_LOCK_FREE == 2, "should be compile-time 2");
jvoung (off chromium) 2014/10/08 22:40:23 #else ... // TODO other architectures like mips.
Derek Schuff 2014/10/09 16:55:42 Done. Yeah there may well never be a non-pnacl mip
+#endif
}
#define TEST_IS_LOCK_FREE(TYPE) do { \
« tests/threads/race_test.c ('K') | « tests/toolchain/nacl.scons ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698