summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences/vector
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-2071-5083/+0
| | | | llvm-svn: 224658
* Added vector<T>::insert tests suggested by code coverage resultsMarshall Clow2014-11-113-0/+99
| | | | llvm-svn: 221689
* [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
* Add Address Sanitizer support to std::vectorMarshall Clow2014-05-0838-0/+376
| | | | llvm-svn: 208319
* Added tests to the sequence containers for for LWG Issue #2263. Comparing ↵Marshall Clow2014-03-101-3/+17
| | | | | | 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-051-0/+6
| | | | | | 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-041-8/+16
| | | | | | the library llvm-svn: 202885
* Add a test to make sure that vector supports incomplete typesMarshall Clow2014-02-131-0/+23
| | | | llvm-svn: 201349
* Found six (nmostly) identical files named 'test_allocator.h' in the libcxx ↵Marshall Clow2013-12-0316-16/+16
| | | | | | 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-021-1/+1
| | | | | | Moved one to /support, removed the other, and iupdated all the includes. No functionality change llvm-svn: 196118
* There were two identical files named 'min_allocator.h'. Move one of them to ↵Marshall Clow2013-11-2660-60/+60
| | | | | | /support and delete the other. Then adjust all the tests that used them to include the moved one. No functionality change. llvm-svn: 195785
* 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-141-1/+27
| | | | llvm-svn: 190736
* Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.Howard Hinnant2013-08-2326-40/+40
| | | | llvm-svn: 189140
* N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for ↵Marshall Clow2013-08-081-1/+1
| | | | | | __tree_const_iterator constructor. Fix comment typos in other tests llvm-svn: 188019
* N3644 support for <string> and <vector>Marshall Clow2013-08-071-0/+13
| | | | llvm-svn: 187909
* Ok, 3 major changes for debug mode in one commit:Howard Hinnant2013-08-021-54/+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
* War on tabs.Howard Hinnant2013-07-081-27/+27
| | | | llvm-svn: 185865
* Implement full support for non-pointer pointers in custom allocators for vector.Howard Hinnant2013-06-2762-0/+1115
| | | | llvm-svn: 185093
* Test case for r183481.Howard Hinnant2013-06-071-0/+20
| | | | llvm-svn: 183522
* After years of telling people: 'If you ever find any of my code that ↵Howard Hinnant2013-04-181-0/+7
| | | | | | self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case. llvm-svn: 179760
* The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are ↵Howard Hinnant2013-03-291-0/+2
| | | | | | disabled, so #ifdef'ing out the test. llvm-svn: 178350
* Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVMDaniel Dunbar2013-03-271-7/+0
| | | | | | bootstrap with libc++. llvm-svn: 178116
* Tighten up the iterator requirements for the vector member templates. This ↵Howard Hinnant2013-03-261-0/+7
| | | | | | is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point. llvm-svn: 178075
* Another vector debug mode test, and a static test on Allocator::value_type. ↵Howard Hinnant2013-03-261-0/+8
| | | | | | This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576. llvm-svn: 178064
* More vector debug tests.Howard Hinnant2013-03-266-0/+103
| | | | llvm-svn: 178033
* Simply debug mode tests per Dmitri Gribenko's suggestion.Howard Hinnant2013-03-2621-148/+21
| | | | llvm-svn: 178026
* Added debug tests for indexing, pop_back and both forms of erase. Added an ↵Howard Hinnant2013-03-259-0/+405
| | | | | | improved error message for erasing a single element with end(). llvm-svn: 177929
* Remove some erroneous code I was using to debug debug mode.Howard Hinnant2013-03-2512-24/+0
| | | | llvm-svn: 177908
* Debug mode tests for vector::front and back.Howard Hinnant2013-03-254-0/+192
| | | | llvm-svn: 177904
* More vector::iterator debug mode tests. Run by adding to OPTIONS ↵Howard Hinnant2013-03-258-7/+346
| | | | | | -D_LIBCPP_DEBUG2=1. llvm-svn: 177897
* Debug mode: learning to crawl. I need to set up some tests that actually ↵Howard Hinnant2013-03-251-0/+53
| | | | | | test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0. llvm-svn: 177892
* Fix exception safety bug in vector::push_backHoward Hinnant2013-01-111-0/+73
| | | | llvm-svn: 172250
* Move common header files into a 'support' directory; make 'testit' include ↵Marshall Clow2013-01-053-3/+3
| | | | | | -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files llvm-svn: 171594
* Removed several more different 'iterators.h' files in libcxx/testMarshall Clow2013-01-033-3/+3
| | | | llvm-svn: 171452
* Add test for self-referencing emplace test.Howard Hinnant2012-07-091-0/+34
| | | | llvm-svn: 159921
* The vector test suite now passes for no-debug, debug-lite and debug-regularHoward Hinnant2011-09-161-0/+3
| | | | llvm-svn: 139930
* Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574Howard Hinnant2011-08-125-10/+10
| | | | llvm-svn: 137522
* noexcept for <vector>. This also includes installing move_if_noexcept() ↵Howard Hinnant2011-06-035-0/+264
| | | | | | into vector. llvm-svn: 132577
* Bug 9096 - list::iterator not default constructibleHoward Hinnant2011-01-281-0/+72
| | | | llvm-svn: 124508
* license changeHoward Hinnant2010-11-1638-76/+76
| | | | llvm-svn: 119395
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-0414-33/+33
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-2218-24/+23
| | | | llvm-svn: 111755
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-1138-38/+38
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-1138-0/+1824
llvm-svn: 103490
OpenPOWER on IntegriCloud