llvm-project/libcxx/test/atomics
David Chisnall 4fa71de024 Fix the remaining atomic tests, all of which were wrong for the case where a
compare-and-exchange failed (it should update the expected value to the current
value, and the tests were checking that it didn't...).

Results of the atomics part of the test suite on FreeBSD with clang trunk and
the atomic.c from compiler-rt (currently kludged into the test, not installed
properly):

****************************************************
Results for /root/libc++/test/atomics:
using clang version 3.1 (trunk 153415)
Target: x86_64-unknown-freebsd10.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -pthread /tmp/atomic.o  
----------------------------------------------------
sections without tests   : 0
sections with failures   : 0
sections without failures: 14
                       +   ----
total number of sections : 14
----------------------------------------------------
number of tests failed   : 0
number of tests passed   : 52
                       +   ----
total number of tests    : 52
****************************************************

Yay!

llvm-svn: 154095
2012-04-05 13:48:16 +00:00
..
atomics.fences After a long break to wait for the atomic spec to settle, this completes the library part of <atomic>. It currently won't even parse as it depends on the existence of the intrinsics specified at http://libcxx.llvm.org/atomic_design_a.html. Everything has been tested using fake intrinsics which have now been removed. As the intrinsics come online, the ATOMIC_* macros will need to be adjusted to reflect which operations are lock-free. These macros will probably need to be #ifdef'd for each supported platform. 2010-12-08 17:20:28 +00:00
atomics.flag license change 2010-11-16 22:09:02 +00:00
atomics.general license change 2010-11-16 22:09:02 +00:00
atomics.lockfree After a long break to wait for the atomic spec to settle, this completes the library part of <atomic>. It currently won't even parse as it depends on the existence of the intrinsics specified at http://libcxx.llvm.org/atomic_design_a.html. Everything has been tested using fake intrinsics which have now been removed. As the intrinsics come online, the ATOMIC_* macros will need to be adjusted to reflect which operations are lock-free. These macros will probably need to be #ifdef'd for each supported platform. 2010-12-08 17:20:28 +00:00
atomics.order license change 2010-11-16 22:09:02 +00:00
atomics.syn license change 2010-11-16 22:09:02 +00:00
atomics.types.generic Fix the remaining atomic tests, all of which were wrong for the case where a 2012-04-05 13:48:16 +00:00
atomics.types.operations Fix the remaining atomic tests, all of which were wrong for the case where a 2012-04-05 13:48:16 +00:00
version.pass.cpp license change 2010-11-16 22:09:02 +00:00