summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Don't return uninitialized data from random_device::operator()David Majnemer2014-06-031-2/+14
| | | | | | | | | | Make sure we appropriately retry calls to read if the return result is less than what we asked for. Additionally, check and handle IO errors: EINTR results in the read operation getting restarted; other errors turn into exceptions. llvm-svn: 210061
* [libc++] random_device fails if open returns zeroDavid Majnemer2014-06-031-0/+11
| | | | | | | | | | | | | random_device::random_device(const string&) wrongly assumes that open can only validly return a file descriptor greater than zero. This results in random_device believing that it didn't successfully open the device causing it to throw in it's constructor, this ends up leaking a file descriptor. The fix is simple, don't error on file descriptors which are zero. llvm-svn: 210060
* Remove unused code in a libc++ test.Nico Weber2014-06-021-17/+0
| | | | | | | | | | | Other tests in this directory use this type, so it's probably copypasta from there. (test_buf only forwards to the superclass in all tests where it's used though, so I wonder if it can be replaced with just using filebuf / wfilebuf everywhere?) llvm-svn: 210019
* Fix XFAIL condition from r208840Justin Bogner2014-05-311-3/+3
| | | | | | | The XFAILs in r208840 were too general. They were meant to only apply to testing when use_system_lib was set. llvm-svn: 209972
* fix typoNico Weber2014-05-292-2/+2
| | | | llvm-svn: 209819
* Linux: Correctly identify valid error codesDavid Majnemer2014-05-291-2/+2
| | | | | | | | | | | | | | [syserr.errcat.objects]p4 specifies that system_category().default_error_condition(ev) map to error_condition(posv, generic_category()) if ev could map to a POSIX errno. Linux reserves up to and including 4095 for errno values, use this as a bound. This fixes syserr.errcat.objects/system_category.pass.cpp on Linux. llvm-svn: 209795
* Fix a problem exposed by r208825, which caused bind (and other bits of ↵Marshall Clow2014-05-291-0/+23
| | | | | | libc++) to stop working. And tests llvm-svn: 209785
* Fix bug 19840, where some tests were not testing what we wanted. Thanks to ↵Marshall Clow2014-05-232-12/+12
| | | | | | Eric for the bug report llvm-svn: 209520
* Fix Bug 19678 - libc++ does not correctly handle the regex: '[^\0]*'Marshall Clow2014-05-211-0/+12
| | | | llvm-svn: 209307
* Fix bug 19740; round-tripping a pointer through a stream doesn't workMarshall Clow2014-05-211-0/+18
| | | | llvm-svn: 209305
* Fix typo 'fourty' in testsAlp Toker2014-05-1520-87/+87
| | | | llvm-svn: 208870
* Fix typosAlp Toker2014-05-153-8/+8
| | | | llvm-svn: 208869
* Work around ABI differences due to LWG 2056 in testsJustin Bogner2014-05-152-1/+16
| | | | | | | | | When testing against the system library, there is a relatively minor ABI breakage that the std::future_errc values have been changed to avoid using zero. Update the tests that rely on the values being consistent. llvm-svn: 208840
* Remove XFAIL from a number of tests that aren't expected to failJustin Bogner2014-05-156-18/+0
| | | | | | | | These tests haven't been failing on darwin11 or 12 since r189610 when pr17027 was fixed, but they've been keeping the libc++ bot red by XPASSing since then. llvm-svn: 208831
* Add Address Sanitizer support to std::vectorMarshall Clow2014-05-0839-0/+413
| | | | llvm-svn: 208319
* Fix PR 19663. Some calls to find(vector<bool>) were returning iterators that ↵Marshall Clow2014-05-061-0/+2
| | | | | | were subtly invalid (didn't compare equal). Thanks to Erik Verbruggen for the report (and diagnosis) llvm-svn: 208096
* Fix bug #18350. Add tests for tuples of all the smart pointers (except auto_ptr)Marshall Clow2014-04-261-0/+35
| | | | llvm-svn: 207307
* Added some tests for equal elements in min_element and max_element. Bug ↵Marshall Clow2014-04-252-0/+36
| | | | | | #19547 was invalid, but we weren't testing that case llvm-svn: 207232
* Default the copy and move constructors for __tuple_leaf. This fixes bugs ↵Marshall Clow2014-04-211-0/+35
| | | | | | 18853 and 19118. Add a test case for that. llvm-svn: 206829
* Add more tests for std::ws as pointed out by bug #19497Marshall Clow2014-04-211-0/+20
| | | | llvm-svn: 206770
* Bug #19473. If you pass an allocator to std::function, we should use that ↵Marshall Clow2014-04-182-0/+69
| | | | | | allocator, not construct one from scratch. Add a test to make sure llvm-svn: 206623
* Fixed a test that was attempting to use rvalue-references w/o checking to ↵Marshall Clow2014-04-171-1/+4
| | | | | | see if they were supported in the language. This resulted in a warning when testing using C++03. llvm-svn: 206482
* Fix PR19819Marshall Clow2014-04-072-1/+43
| | | | llvm-svn: 205709
* [libc++] Teach is_integral, is_[un]signed and make_[un]signed about ↵Stephan Tolksdorf2014-03-2639-0/+188
| | | | | | | | | | __[u]int128_t This commit also adds tests for std::numeric_limits<__[u]int128_t>. Reviewed in http://llvm-reviews.chandlerc.com/D2917 llvm-svn: 204849
* Add tests that should fail when lock() throws. THis is part of LWG issue ↵Marshall Clow2014-03-262-0/+104
| | | | | | #2135. No library changes here. llvm-svn: 204777
* Add a test to make sure we're doing the right thing for throwing exceptions ↵Marshall Clow2014-03-241-0/+19
| | | | | | from deferred functions. This is LWG issue #2186. No change to the library needed. llvm-svn: 204678
* Implement N3891: A proposal to rename shared_mutex to shared_timed_mutexDavid Majnemer2014-03-1727-72/+72
| | | | | | | | | | This is as straightforward as it sounds, a renamed from shared_mutex to shared_timed_mutex. Note that libcxx .dylib and .so files built with c++14 support need to be rebuilt. llvm-svn: 204078
* Implement LWG 2360: 'reverse_iterator::operator*() is unimplementable'. Note ↵Marshall Clow2014-03-112-43/+5
| | | | | | that this is a (small) behavior change in the library. Reverse iterators whose base iterators' operator* return references to 'within themselves' have been sacrificed to the greater goal of avoiding data races. llvm-svn: 203587
* Patch from Steve MacKenzie to make the libc++ tests play nicely with MSVC's ↵Marshall Clow2014-03-114-0/+4
| | | | | | STL. Add '#include <functional>' to four of the priority queue tests. llvm-svn: 203584
* Final bit for LWG #2263; test different allocator pointer types. Note that ↵Marshall Clow2014-03-112-0/+232
| | | | | | libc++ already does the right thing here; I've just added tests to ensure that it stays this way. llvm-svn: 203539
* Add tests for LWG issue #2356. Stability of erasure in unordered associative ↵Marshall Clow2014-03-104-0/+143
| | | | | | containers. Libc++ already does this, but now we have tests for it. llvm-svn: 203494
* More tests for LWG Issue #2263; this time to the associative and unordered ↵Marshall Clow2014-03-108-24/+48
| | | | | | containers. Still no changes to libc++ llvm-svn: 203480
* Added tests to the sequence containers for for LWG Issue #2263. Comparing ↵Marshall Clow2014-03-106-18/+78
| | | | | | iterators and allocator pointers with different const-character. No changes to libc++ llvm-svn: 203479
* Implement LWG #2344: quoted()'s interaction with padding is unclear. I think ↵Marshall Clow2014-03-071-4/+19
| | | | | | that anyone using quoted with padding is really confused, but it should work the way the rest of iostreams works. llvm-svn: 203290
* Fix a couple of -Wabsolute-value warnings in the libc++ testsMarshall Clow2014-03-062-4/+4
| | | | llvm-svn: 203126
* Do not derive __gnu_cxx::hash<T> from std::hash<T>.Peter Collingbourne2014-03-063-0/+58
| | | | | | | | | | | | | | | | | | Instead, define explicit specializations for the basic types listed in the SGI documentation. This solves two problems: 1) Helps avoid silent ODR violations caused by the absence of a user-supplied __gnu_cxx::hash specialization in cases where a std::hash specialization exists (e.g. for std::string). 2) __gnu_cxx::hash semantics are slightly different to those of std::hash (for example, the former may dereference a pointer argument) so it is inappropriate for __gnu_cxx::hash to receive std::hash specializations by default. Differential Revision: http://llvm-reviews.chandlerc.com/D2747 llvm-svn: 203070
* Implement LWG 2193. Default constructors for standard library containers are ↵Marshall Clow2014-03-0514-1/+84
| | | | | | explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unordered containers; implement it for set/multiset/map/multimap. Add tests for all the containers. Two drive-by fixes as well: add a missing explicit in <deque>, and remove a tab that snuck into a container test. This issue is also LLVM bug 15724, and resolves it. llvm-svn: 202994
* Mark is_final as a C++14 feature.Marshall Clow2014-03-051-1/+1
| | | | llvm-svn: 202991
* Remove definition of std::fmaf from libc++. Fixes bug #18910. This function ↵Marshall Clow2014-03-051-2/+2
| | | | | | should come from the C standard library. As a drive-by fix, update the tests to remove a warning from -Wabsolute-value llvm-svn: 202990
* Implement LWG #2212: std::is_final. This requires compiler support, which ↵Marshall Clow2014-03-051-0/+53
| | | | | | modern versions of clang provide. Also mark LWG #2230 as complete - no code changes needed. llvm-svn: 202934
* Update synposis in <memory> to show move semantics for weak_ptr; add tests ↵Marshall Clow2014-03-054-0/+65
| | | | | | for already existing move semantics. Mark LWG issues #2315 (no changes needed), 2316 (move semantics for weak_ptr), 2252 (previous commit) and 2271 (previous commit) as complete. llvm-svn: 202931
* LWG Issue #2271: regex_traits::lookup_classname specification unclear. ↵Marshall Clow2014-03-041-6/+6
| | | | | | libc++ already does the right thing; just update the tests. llvm-svn: 202904
* LWG issue #2252: Add more tests for exception safety. No changes needed in ↵Marshall Clow2014-03-043-24/+48
| | | | | | the library llvm-svn: 202885
* Implement LWG #2268: Setting a default argument in the declaration of a ↵Marshall Clow2014-03-045-5/+179
| | | | | | member function assign of std::basic_string. llvm-svn: 202876
* [libc++] Const qualify __gnu_cxx::hash_map<>::const_iterator::pointer type.Peter Collingbourne2014-03-031-0/+18
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2811 llvm-svn: 202749
* Implement LWG 2324: Insert iterator constructors should use addressof(). Add ↵Marshall Clow2014-03-0319-0/+337
| | | | | | two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers. llvm-svn: 202741
* Remove a stray tab that snuck into a test. No functionality changeMarshall Clow2014-03-031-1/+1
| | | | llvm-svn: 202739
* Implement LWG Paper n3887: Consistent Metafunction Aliases. This adds ↵Marshall Clow2014-03-031-0/+7
| | | | | | std::tuple_element_t<> as an alias for tuple_element<>::type. Clean up the synopsis for tuple_element in <utility> as well. llvm-svn: 202673
* Implement LWG Issue #2285 - make_reverse_iterator. Also mark issues #1450 ↵Marshall Clow2014-03-031-0/+42
| | | | | | and #2205 as complete; they are just wording changes in the standard. Mark issues #2359, #2320 and #2322 as complete - libc++ implements them already. llvm-svn: 202671
* More LWG issues. Mark #2182, #2323 and #2213 as complete. Add a test for ↵Marshall Clow2014-02-272-0/+2
| | | | | | #2339, and mark that as complete. No actual changes to the libc++ code; all of these were already in place. llvm-svn: 202407
OpenPOWER on IntegriCloud