summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-20337-24483/+0
| | | | llvm-svn: 224658
* Add 'REQUIERS: long_tests' to a few more long testsJonathan Roelofs2014-12-113-0/+6
| | | | llvm-svn: 224064
* Added vector<T>::insert tests suggested by code coverage resultsMarshall Clow2014-11-115-0/+130
| | | | llvm-svn: 221689
* EricQWF's code coverage work showed that none of the libc++ tests were ↵Marshall Clow2014-11-114-7/+81
| | | | | | exercising some code in vector<bool>. Add more tests in an attempt to get better coverage llvm-svn: 221644
* Actually mark the tests an unsupported with MSAN (not just ASAN)Eric Fiselier2014-11-043-3/+3
| | | | llvm-svn: 221240
* Mark tests that replace operator new/delete as UNSUPPORTED with ASAN and MSAN.Eric Fiselier2014-11-043-0/+6
| | | | | | | tests that replace operator new/delete won't link when using ASAN and MSAN because these sanitizers also replace new/delete. llvm-svn: 221236
* [libcxx] Fix use of operator comma where the types can be user definedEric Fiselier2014-10-271-1/+1
| | | | | | | | | | | | | | | | Summary: An evil user might overload operator comma. Use a void cast to make sure any user overload is not selected. Modify all the test iterators to define operator comma. Reviewers: danalbert, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5929 llvm-svn: 220706
* Fix unused variables in tests to placate scan-build. Patch from Steve MacKenzie.Eric Fiselier2014-10-192-0/+2
| | | | llvm-svn: 220154
* Whitespace maintenance. Remove a bunch of tabs that snuck in. No ↵Marshall Clow2014-10-182-22/+22
| | | | | | functionality change llvm-svn: 220142
* [asan] Make vector asan annotations exception-friendlyKostya Serebryany2014-09-021-0/+198
| | | | | | | | | Fix vector asan annotations with RAII. Add a test. Also, remove one dead function. Review: http://reviews.llvm.org/D4170 llvm-svn: 216995
* Apply a similar fix to <forward_list> as I did for <list> in r215210. Again, ↵Marshall Clow2014-08-081-0/+37
| | | | | | thanks to Ion Gaztañaga for noticing this problem w.r.t LWG#526 llvm-svn: 215213
* While reading LWG#526, Ion Gaztañaga noticed that libc++ didn't correctly ↵Marshall Clow2014-08-081-0/+32
| | | | | | handle list::remove(const value_type &x), if x was an element of the list. Added a test for this, and a fix. Thanks to Ion for the report. llvm-svn: 215210
* Fix PR#202520 - predicate called too many times in list::remove_if. Add ↵Marshall Clow2014-08-042-12/+65
| | | | | | tests for list, forward_list, and the std::remove_if algorithm llvm-svn: 214736
* Fix some failing tests for the standard containers. The tests were failing ↵Marshall Clow2014-07-084-19/+27
| | | | | | in 32-bit mode because they assumed that std::size_type and make_unsigned<ptrdiff_t>::type were always the same type. No change to libc++, just the tests. llvm-svn: 212538
* Add Address Sanitizer support to std::vectorMarshall Clow2014-05-0838-0/+376
| | | | 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
* 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 2193. Default constructors for standard library containers are ↵Marshall Clow2014-03-055-0/+27
| | | | | | 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
* LWG issue #2252: Add more tests for exception safety. No changes needed in ↵Marshall Clow2014-03-043-24/+48
| | | | | | the library llvm-svn: 202885
* Add a test to make sure that vector supports incomplete typesMarshall Clow2014-02-131-0/+23
| | | | llvm-svn: 201349
* Support forward_list<Incomplete Type>. Patch by Zhihao Yuan!Peter Collingbourne2014-02-051-0/+25
| | | | llvm-svn: 200814
* Found six (nmostly) identical files named 'test_allocator.h' in the libcxx ↵Marshall Clow2013-12-0381-81/+81
| | | | | | test suite. Moved one to /support, made it a superset, and removed all but one of the others, and iupdated all the includes. Left the odd one (thread/futures/test_allocator.h) for later. llvm-svn: 196174
* Found two identical files named 'DefaultOnly.h' in the libcxx test suite. ↵Marshall Clow2013-12-0213-13/+13
| | | | | | Moved one to /support, removed the other, and iupdated all the includes. No functionality change llvm-svn: 196118
* Fix for PRPR17934; based on a fix suggested by Peter SommerladMarshall Clow2013-12-021-10/+28
| | | | llvm-svn: 196058
* There were two identical files named 'min_allocator.h'. Move one of them to ↵Marshall Clow2013-11-26258-258/+258
| | | | | | /support and delete the other. Then adjust all the tests that used them to include the moved one. No functionality change. llvm-svn: 195785
* Move <dynarray> into include/experimental, and into the std::experimental ↵Marshall Clow2013-11-1311-41/+60
| | | | | | namespace, since it's not part of C++14, but of an upcoming TS llvm-svn: 194614
* Peter Collingbourne: If a pointer is passed as the third argument of the ↵Howard Hinnant2013-09-211-2/+14
| | | | | | | | | | | | (iterator, iterator, allocator) constructor with the intention of it being implicitly converted to the allocator type, it is possible for overload resolution to favour the (iterator, iterator, enable_if) constructor. Eliminate this possibility by moving the enable_if to one of the existing arguments and removing the third argument. llvm-svn: 191145
* LWG Issue 2210 (Part #7): vector and vector<bool>Marshall Clow2013-09-142-2/+54
| | | | llvm-svn: 190736
* Initial implementation of <dynarray>. No allocator support pending ↵Marshall Clow2013-09-1312-0/+768
| | | | | | resolution of LWG #2235; no stack allocation pending compiler support llvm-svn: 190697
* A collection of minor type-o fixes. The first two aren't testable, but all ↵Howard Hinnant2013-09-121-1/+1
| | | | | | tests pass with them. I stumbled across them while experimenting with a std::move that checks its argument for non-const. The third corrects a test that is currently failing. llvm-svn: 190563
* Remove a tab that snuck inMarshall Clow2013-09-081-1/+1
| | | | llvm-svn: 190283
* Fix minor type-o in tests.Howard Hinnant2013-09-082-2/+2
| | | | llvm-svn: 190280
* LWG Issue 2210 (Part #2 & #3): list and forward_listMarshall Clow2013-09-082-0/+46
| | | | llvm-svn: 190279
* LWG Issue 2210 (Part #1): dequeMarshall Clow2013-09-071-2/+56
| | | | llvm-svn: 190251
* Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.Howard Hinnant2013-08-2351-84/+84
| | | | llvm-svn: 189140
* Implement LWG Issue #2187 (emplace_back and emplace for vector<bool>)Marshall Clow2013-08-132-0/+125
| | | | llvm-svn: 188333
* N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for ↵Marshall Clow2013-08-085-5/+5
| | | | | | __tree_const_iterator constructor. Fix comment typos in other tests llvm-svn: 188019
* N3644 support for vector<bool>Marshall Clow2013-08-071-0/+12
| | | | llvm-svn: 187910
* N3644 support for <string> and <vector>Marshall Clow2013-08-071-0/+13
| | | | llvm-svn: 187909
* Correct logic bug in find optimization for vector<bool>. This fixes ↵Howard Hinnant2013-08-071-0/+38
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=16816 llvm-svn: 187908
* War on tabsHoward Hinnant2013-08-071-1/+1
| | | | llvm-svn: 187906
* Implement tests for NULL iterators for <array> re: N3644Marshall Clow2013-08-061-0/+79
| | | | llvm-svn: 187809
* Implement NULL iterators for <forward_list> and <deque> re: N3644Marshall Clow2013-08-062-0/+38
| | | | llvm-svn: 187805
* Implement NULL iterators for <list> re: N3644Marshall Clow2013-08-052-0/+85
| | | | llvm-svn: 187740
* Ok, 3 major changes for debug mode in one commit:Howard Hinnant2013-08-022-108/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. I had been detecting and trapping iterator == and \!= among iterators in different containers as an error. But the trapping itself is actually an error. Consider: #include <iostream> #include <vector> #include <algorithm> template <class C> void display(const C& c) { std::cout << "{"; bool first = true; for (const auto& x : c) { if (\!first) std::cout << ", "; first = false; std::cout << x; } std::cout << "}\n"; } int main() { typedef std::vector<int> V; V v1 = {1, 3, 5}; V v2 = {2, 4, 6}; display(v1); display(v2); V::iterator i = std::find(v1.begin(), v1.end(), 1); V::iterator j = std::find(v2.begin(), v2.end(), 2); if (*i == *j) i = j; // perfectly legal // ... if (i \!= j) // the only way to check v2.push_back(*i); display(v1); display(v2); } It is legal to assign an iterator from one container to another of the same type. This is required to work. One might want to test whether or not such an assignment had been made. The way one performs such a check is using the iterator's ==, \!= operator. This is a logical and necessary function and does not constitute an error. 2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined. This caused a problem in several of the libc++ tests. Fixed. 3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that std::basic_string is inoperable. std::basic_string uses __wrap_iterator to implement its iterators. __wrap_iterator has been rigged up in debug mode to support vector. But string hasn't been rigged up yet. This means that one gets false positives when using std::string in debug mode. I've upped std::string's priority in www/debug_mode.html. llvm-svn: 187636
* Debug mode for unordered_set. I believe this to be fairly complete forHoward Hinnant2013-07-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unordered_set, however it is not complete yet for unordered_multiset, unordered_map or unordered_multimap. There has been a lot of work done for these other three containers, however that work was done just to keep all of the tests passing. You can try this out with -D_LIBCPP_DEBUG2. You will have to link to a libc++.dylib that has been compiled with src/debug.cpp. So far, vector (but not vector<bool>), list, and unordered_set are treated. I hope to get the other three unordered containers up fairly quickly now that unordered_set is done. The flag _LIBCPP_DEBUG2 will eventually be changed to _LIBCPP_DEBUG, but not today. This is my second effort at getting debug mode going for libc++, and I'm not quite yet ready to throw all of the work under the first attempt away. The basic design is that all of the debug information is kept in a central database, instead of in the containers. This has been done as an attempt to have debug mode and non-debug mode be ABI compatible with each other. There are some circumstances where if you construct a container in an environment without debug mode and pass it into debug mode, the checking will get confused and let you know with a readable error message. Passing containers the other way: from debug mode out to a non-debugging mode container should be 100% safe (at least that is the goal). llvm-svn: 186991
* Make std::get constexprMarshall Clow2013-07-176-0/+231
| | | | llvm-svn: 186525
* War on tabs.Howard Hinnant2013-07-087-163/+163
| | | | llvm-svn: 185865
* Implement full support for non-pointer pointers in custom allocators for vector.Howard Hinnant2013-06-2794-7/+1647
| | | | llvm-svn: 185093
* Implement full support for non-pointer pointers in custom allocators for list.Howard Hinnant2013-06-2564-4/+1857
| | | | llvm-svn: 184859
OpenPOWER on IntegriCloud