Howard Hinnant
caee2b093f
Fix a few testsuite bugs involving trailing null (or lack thereof) in strstream.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157832 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01 20:02:59 +00:00
Howard Hinnant
635ce1d127
The rules for emplace in map, multimap, unordered_map and unordered_multimap changed a while back and I'm just now updating to these new rules. In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors. I made one extension: If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157503 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-25 22:04:21 +00:00
Richard Smith
9efdc0bd5f
libc++: Add some missing #includes to atomics tests. libc++ doesn't need these
...
at the moment, but they allow these tests to be used to test clang against
libstdc++. Add myself to the credits file, as suggested by Howard.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@155085 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:50:47 +00:00
David Chisnall
d3eca759a2
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!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-05 13:48:16 +00:00
David Chisnall
1ee87fa41a
Fix test cases that were trying to make atomic things that are not trivially copyable.
...
Now all of the test cases compile. Some of them even run!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154094 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-05 13:23:08 +00:00
Howard Hinnant
8efd3dac5d
Update <random> with constexpr support. Patch contributed by Jonathan Sauer.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 21:00:45 +00:00
Howard Hinnant
2cf89a71df
Fix test for default constructor of discrete_distribution. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=12436 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 15:00:14 +00:00
Howard Hinnant
dc1345fd44
I believe tuple is still under development in the standard. Daniel Krugler is/will be making convincing arguments that a modified form of LWG 2051 (currently NAD Future) is easily acheivable and desirable. He has demonstrated that a tuple<T...> where all of the T are implicitly convertible from U... should have a tuple constructor that is also implicit, instead of explicit. This would support the use cases in LWG 2051 while not undermining T... with explicit conversions from U.... This check-in is an experimental implementation of Daniel's work. I believe this work to be mature enough to warrant inclusion into libc++. If anyone sees real-world problems that this check in causes, please let me know and I will revert it, and provide the feedback to the LWG.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153855 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-01 23:10:42 +00:00
Howard Hinnant
87c61a61fe
Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-19 15:40:23 +00:00
David Chisnall
b407d45d83
Don't refer to a function that doesn't exist in the quick_exit test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 14:02:15 +00:00
Jeffrey Yasskin
558ae17391
Fix moneypunct_byname algorithm to more accurately represent C locales in C++.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 18:31:43 +00:00
David Chisnall
f2b2cc6440
Make the failure reporting in testit a bit more useful.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:00:44 +00:00
Howard Hinnant
a231c37df7
update test for explicit bool operator.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151461 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 21:43:14 +00:00
Howard Hinnant
896baa2547
Silence some warnings in a test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151451 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 20:04:11 +00:00
Howard Hinnant
4300839b5f
Hook up to the new clang __is_trivially_constructible and __is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151406 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 23:32:26 +00:00
Dave Zarzycki
b9344c218b
Use Xcode relative compilers when possible
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 00:20:30 +00:00
Howard Hinnant
3fadda314a
Modernize relational operators for shared_ptr and unique_ptr. This includes adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151084 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21 21:02:58 +00:00
Howard Hinnant
6df1412ca6
Relax pointer output test to accept glibc's output. Patch supplied by Jeffrey Yasskin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150927 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 14:51:01 +00:00
Howard Hinnant
01198b313c
Exercise rvalue arguements to make_shared for C++11 mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 20:12:03 +00:00
Howard Hinnant
2848444954
tuple was accidentally lacking a valid copy assignment operator. It went undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150613 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 20:13:52 +00:00
Howard Hinnant
b04ad4162d
Do not parse sign if a sign is not the next legal character when parsing floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 19:19:37 +00:00
Howard Hinnant
8e50a9cf73
Remove quotes from locale name identifier. Credit Edward Meewis.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146655 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15 15:01:38 +00:00
Howard Hinnant
40c13d31c5
Starting using murmur2 when combining multiple size_t's into a single hash, and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145795 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-05 00:08:45 +00:00
Howard Hinnant
f836d531b4
unord test fixes by Edward Meewis
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145707 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 21:23:14 +00:00
Howard Hinnant
f6d875f7f5
Fix http://llvm.org/bugs/show_bug.cgi?id=11428 . Fix provided by Alberto Ganesh Barbati
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145698 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 19:36:40 +00:00
Howard Hinnant
ce6884cc76
Fix ratio arithmetic with zero
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@143519 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 23:13:37 +00:00
Howard Hinnant
b97de44471
Fix <rdar://problem/10256836> getline of an empty string mistakenly causes failure
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141506 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-09 15:20:46 +00:00
Howard Hinnant
c6fe8cafc3
Fix <rdar://problem/10255403> match_results::begin() is off by one
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141494 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-08 14:36:16 +00:00
Howard Hinnant
c0d0cbad9e
Windows porting work by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141003 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-03 15:23:59 +00:00
Howard Hinnant
8452d21f41
Updated testit to run on Windows and fresh Windows results by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140950 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-01 15:34:27 +00:00
Howard Hinnant
1c3ec6d480
Another installment on debug mode. This addresses list. However this should be considered a temporary state. The API of the debug database and how vector and list use it, is unsatisfactory at the moment. It is both inefficient and overly verbose. I wanted to get this functionality checked in though. In the next day or so I'll refactor what is there in an attempt to streamline things.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140660 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 23:55:03 +00:00
Howard Hinnant
59832523ac
Fix test bugs found by David Chisnall
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140271 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 18:33:46 +00:00
David Chisnall
9e02b90405
Fix locales used in re tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 17:38:03 +00:00
David Chisnall
2fb1a9d1e8
Remove undefines in cstdio test. Fix these properly rather than bodging the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140264 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 17:37:18 +00:00
David Chisnall
86698890db
More +.UTF-8 fixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140262 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 17:35:42 +00:00
Howard Hinnant
709c3d27f5
Fix failure found by David Chisnall
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140255 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 16:42:32 +00:00
David Chisnall
db2e99f852
More fixes to the tests. Add UTF-8 encoding to all locales that don't specify one. Undefine some stdio.h macros that break the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140252 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 14:59:10 +00:00
David Chisnall
a824f53600
Fully-qualify some more locales in the tests...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140251 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 14:48:49 +00:00
David Chisnall
eb2c855c44
Don't check STREAMS error numbers on systems that don't implement the obsolete (as described in POSIX2008) XSI STREAMS extension.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140248 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 12:23:11 +00:00
David Chisnall
6b8ac3acda
More locale cleanups. Fully specify locales in iostream tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140247 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 12:09:17 +00:00
David Chisnall
e2f2a15066
Localisation test fixes to make the tests pass on FreeBSD, which does not provide shortened forms of the various locales (e.g. en_US, rather than en_US.UTF-8 / en_US.ISO{whatever}).
...
Reviewed by Howard Hinnant.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140242 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 08:19:20 +00:00
Howard Hinnant
0442b12591
The vector test suite now passes for no-debug, debug-lite and debug-regular
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139930 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-16 18:41:29 +00:00
Howard Hinnant
92a836c03d
Reimplemented much of <istream> such that single character extractions do not check to see if this is the last character in the stream and thus never set eofbit. This fixes http://llvm.org/bugs/show_bug.cgi?id=10817 . This fix requires a recompiled libc++.dylib to be fully implemented. The recompiled libc++.dylib is ABI compatible with that shipped on Lion.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@138961 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-01 21:02:45 +00:00
Howard Hinnant
e3e3291f3a
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 21:56:02 +00:00
Howard Hinnant
bf6666f7a0
Correct test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 01:07:49 +00:00
Sean Hunt
541cb301a1
Adjust two tests to account for a nasty change in copying behavior
...
between C++03 and C++0x and its effect on exceptions, and another two to
not test move construction when rvalue references are not available.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135445 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 23:51:25 +00:00
Sean Hunt
13aaf422e4
Make all fstream tests use tmpnam if creating files, rather than
...
hard-coded names.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135444 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 23:51:21 +00:00
Sean Hunt
e6440c6fa2
Do a litmus test of using tmpnam to generate safe temporary file names
...
for the tests that open new data files.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135422 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 20:46:16 +00:00
Sean Hunt
737a351850
Given that __underlying_type is now available in clang, implement
...
std::underlying_type.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135410 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 18:37:21 +00:00
Sean Hunt
2d81f3d1f3
Give A an explicitly non-throwing destructor so that B's destructor is
...
itself non-throwing. Since nested_exception's destructor is
non-throwing, if B's destructor is not, this causes an error in C++03
mode due to the overriding function having a more lax specification.
This did not occur in C++0x mode as A's destructor was implicitly
non-throwing.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135400 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 17:07:53 +00:00