summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* constexpr applied to <complex>.Howard Hinnant2012-07-2010-1/+113
| | | | llvm-svn: 160585
* Relax the tolerances on some timing tests.Howard Hinnant2012-07-202-2/+2
| | | | llvm-svn: 160566
* noexcept applied to <iterator>.Howard Hinnant2012-07-201-1/+1
| | | | llvm-svn: 160565
* constexpr applied to <array>.Howard Hinnant2012-07-201-0/+14
| | | | llvm-svn: 160564
* Relax the complete-type checks that are happening under __invokable<Fp, ↵Howard Hinnant2012-07-161-0/+29
| | | | | | Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>. llvm-svn: 160285
* Applied constexpr to <chrono>.Howard Hinnant2012-07-1325-6/+357
| | | | llvm-svn: 160184
* Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to ↵Howard Hinnant2012-07-122-0/+4
| | | | | | Jonathan Coxhead for reporting this bug. llvm-svn: 160136
* Add test for self-referencing emplace test.Howard Hinnant2012-07-091-0/+34
| | | | llvm-svn: 159921
* Apply constexpr to <bitset>.Howard Hinnant2012-07-073-2/+5
| | | | llvm-svn: 159899
* Give tuple a constexpr default constructor.Howard Hinnant2012-07-061-0/+14
| | | | llvm-svn: 159857
* Add noexcept test for offsetof macro per [support.types]/p4.Howard Hinnant2012-07-061-0/+8
| | | | llvm-svn: 159846
* This commit establishes a new bucket_count policy in the unordered ↵Howard Hinnant2012-07-064-4/+4
| | | | | | containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have. llvm-svn: 159836
* Fix a few testsuite bugs involving trailing null (or lack thereof) in strstream.Howard Hinnant2012-06-015-7/+7
| | | | llvm-svn: 157832
* The rules for emplace in map, multimap, unordered_map and unordered_multimap ↵Howard Hinnant2012-05-259-12/+33
| | | | | | 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()). llvm-svn: 157503
* libc++: Add some missing #includes to atomics tests. libc++ doesn't need theseRichard Smith2012-04-1925-1/+25
| | | | | | | 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. llvm-svn: 155085
* Fix the remaining atomic tests, all of which were wrong for the case where aDavid Chisnall2012-04-057-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix test cases that were trying to make atomic things that are not trivially ↵David Chisnall2012-04-0511-44/+0
| | | | | | | | copyable. Now all of the test cases compile. Some of them even run! llvm-svn: 154094
* Update <random> with constexpr support. Patch contributed by Jonathan Sauer.Howard Hinnant2012-04-024-12/+20
| | | | llvm-svn: 153896
* Fix test for default constructor of discrete_distribution. This partially ↵Howard Hinnant2012-04-021-6/+3
| | | | | | addresses http://llvm.org/bugs/show_bug.cgi?id=12436. llvm-svn: 153873
* I believe tuple is still under development in the standard. Daniel Krugler ↵Howard Hinnant2012-04-012-4/+25
| | | | | | 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. llvm-svn: 153855
* Allow libc++ to be built with CMake from within the LLVM tree. The libc++ ↵Howard Hinnant2012-03-191-1/+1
| | | | | | 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. llvm-svn: 153036
* Don't refer to a function that doesn't exist in the quick_exit test.David Chisnall2012-03-141-1/+1
| | | | llvm-svn: 152716
* Fix moneypunct_byname algorithm to more accurately represent C locales in C++.Jeffrey Yasskin2012-03-106-150/+147
| | | | llvm-svn: 152501
* Make the failure reporting in testit a bit more useful.David Chisnall2012-02-291-2/+4
| | | | llvm-svn: 151719
* update test for explicit bool operator.Howard Hinnant2012-02-251-3/+3
| | | | llvm-svn: 151461
* Silence some warnings in a test.Howard Hinnant2012-02-251-0/+2
| | | | llvm-svn: 151451
* Hook up to the new clang __is_trivially_constructible and ↵Howard Hinnant2012-02-242-11/+19
| | | | | | __is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038. llvm-svn: 151406
* Use Xcode relative compilers when possibleDave Zarzycki2012-02-221-1/+6
| | | | llvm-svn: 151108
* Modernize relational operators for shared_ptr and unique_ptr. This includes ↵Howard Hinnant2012-02-212-0/+142
| | | | | | adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056. llvm-svn: 151084
* Relax pointer output test to accept glibc's output. Patch supplied by ↵Howard Hinnant2012-02-191-1/+1
| | | | | | Jeffrey Yasskin. llvm-svn: 150927
* Exercise rvalue arguements to make_shared for C++11 mode.Howard Hinnant2012-02-181-0/+11
| | | | llvm-svn: 150887
* tuple was accidentally lacking a valid copy assignment operator. It went ↵Howard Hinnant2012-02-152-2/+2
| | | | | | undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921 llvm-svn: 150613
* Do not parse sign if a sign is not the next legal character when parsing ↵Howard Hinnant2012-02-152-0/+24
| | | | | | floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871 llvm-svn: 150609
* Remove quotes from locale name identifier. Credit Edward Meewis.Howard Hinnant2011-12-151-1/+1
| | | | llvm-svn: 146655
* Starting using murmur2 when combining multiple size_t's into a single hash, ↵Howard Hinnant2011-12-051-1/+2
| | | | | | 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. llvm-svn: 145795
* unord test fixes by Edward MeewisHoward Hinnant2011-12-0273-93/+166
| | | | llvm-svn: 145707
* Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto ↵Howard Hinnant2011-12-026-92/+93
| | | | | | Ganesh Barbati llvm-svn: 145698
* Fix ratio arithmetic with zeroHoward Hinnant2011-11-012-0/+36
| | | | llvm-svn: 143519
* Fix <rdar://problem/10256836> getline of an empty string mistakenly causes ↵Howard Hinnant2011-10-091-2/+8
| | | | | | failure llvm-svn: 141506
* Fix <rdar://problem/10255403> match_results::begin() is off by oneHoward Hinnant2011-10-082-4/+4
| | | | llvm-svn: 141494
* Windows porting work by Ruben Van BoxemHoward Hinnant2011-10-0390-343/+558
| | | | llvm-svn: 141003
* Updated testit to run on Windows and fresh Windows results by Ruben Van BoxemHoward Hinnant2011-10-011-6/+15
| | | | llvm-svn: 140950
* Another installment on debug mode. This addresses list. However this ↵Howard Hinnant2011-09-271-0/+3
| | | | | | 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. llvm-svn: 140660
* Fix test bugs found by David ChisnallHoward Hinnant2011-09-217-15/+15
| | | | llvm-svn: 140271
* Fix locales used in re tests.David Chisnall2011-09-215-13/+13
| | | | llvm-svn: 140265
* Remove undefines in cstdio test. Fix these properly rather than bodging the ↵David Chisnall2011-09-211-24/+0
| | | | | | tests. llvm-svn: 140264
* More +.UTF-8 fixes.David Chisnall2011-09-2120-31/+31
| | | | llvm-svn: 140262
* Fix failure found by David ChisnallHoward Hinnant2011-09-211-129/+129
| | | | llvm-svn: 140255
* More fixes to the tests. Add UTF-8 encoding to all locales that don't ↵David Chisnall2011-09-217-19/+43
| | | | | | specify one. Undefine some stdio.h macros that break the tests. llvm-svn: 140252
* Fully-qualify some more locales in the tests...David Chisnall2011-09-215-11/+11
| | | | llvm-svn: 140251
OpenPOWER on IntegriCloud