summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/containers/sequences
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup [list.modifiers] tests.Eric Fiselier2016-06-229-566/+53
| | | | llvm-svn: 273371
* Move remaining _LIBCPP_VERSION tests into test/libcxxEric Fiselier2016-06-225-100/+0
| | | | llvm-svn: 273367
* Improve portability of vector tests. Patch from STL@microsoft.comEric Fiselier2016-06-151-1/+1
| | | | llvm-svn: 272745
* Replace __cplusplus comparisons and dialect __has_feature checks with ↵Eric Fiselier2016-06-14234-278/+258
| | | | | | | | | TEST_STD_VER. This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! llvm-svn: 272716
* Fix vector<bool> tests that were using ints. Patch from STL@microsoft.comEric Fiselier2016-06-145-17/+17
| | | | llvm-svn: 272620
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-0162-354/+354
| | | | llvm-svn: 271435
* Mark LWG issue #2585 as completeEric Fiselier2016-05-311-1/+20
| | | | llvm-svn: 271240
* [libcxx] Improve tests to use the UNSUPPORTED lit directiveAsiri Rathnayake2016-05-283-6/+3
| | | | | | | | | | | | | | | | | | | Quite a few libcxx tests seem to follow the format: #if _LIBCPP_STD_VER > X // Do test. #else // Empty test. #endif We should instead use the UNSUPPORTED lit directive to exclude the test on earlier C++ standards. This gives us a more accurate number of test passes for those standards and avoids unnecessary conflicts with other lit directives on the same tests. Reviewers: bcraig, ericwf, mclow.lists Differential revision: http://reviews.llvm.org/D20730 llvm-svn: 271108
* Fix or move various non-standard tests.Eric Fiselier2016-04-2914-742/+0
| | | | | | | | | | | | This patch does the following: * Remove <__config> includes from some container tests. * Guards uses of std::launch::any in async tests because it's an extension. * Move "test/std/extensions" to "test/libcxx/extensions" * Moves various non-standard tests including those in "sequences/vector", "std/localization" and "utilities/meta". llvm-svn: 267981
* Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macrosEric Fiselier2016-04-2816-61/+73
| | | | llvm-svn: 267947
* Remove names of unreferenced parameters. Patch from STL@microsoft.comEric Fiselier2016-04-281-1/+1
| | | | llvm-svn: 267852
* Fix some non-standard parts of our test suite. Reported by STLEric Fiselier2016-04-225-59/+8
| | | | llvm-svn: 267131
* Fix C++03 build breakageEric Fiselier2016-04-221-2/+9
| | | | llvm-svn: 267090
* Complete LWG issue #2016. Allocators must be nothrow swappableEric Fiselier2016-04-225-13/+15
| | | | llvm-svn: 267085
* Add is_swappable/is_nothrow_swappable traitsEric Fiselier2016-04-212-0/+50
| | | | llvm-svn: 267079
* Added a noexcept testMarshall Clow2016-04-071-0/+6
| | | | llvm-svn: 265674
* Fix bug #27260 - add missing swap(reference, reference) to vector<bool>.Marshall Clow2016-04-071-0/+31
| | | | llvm-svn: 265672
* Add some more tests for the containers type requirementsMarshall Clow2016-03-096-19/+112
| | | | llvm-svn: 263029
* non-member swap for array was mistakenly taking const ref params. Fixed and ↵Marshall Clow2016-03-071-1/+28
| | | | | | added test. Thanks to Ben Craig for the catch llvm-svn: 262866
* Add additional tests to ensure that we DTRT with short lists. This is ↵Marshall Clow2016-02-231-0/+14
| | | | | | LWG#2590, but there are no code changes, just additional tests llvm-svn: 261648
* [libcxx] Fix undefined behavior in forward_listEric Fiselier2016-01-271-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is similar to the <list> fix but it has a few differences. This patch doesn't use a `__link_pointer` typedef because we don't need to change the linked list pointers because `forward_list` never stores a `__forward_begin_node` in the linked list itself. The issue with `forward_list` is that the iterators store pointers to `__forward_list_node` and not `__forward_begin_node`. This is incorrect because `before_begin()` and `cbefore_begin()` return iterators that point to a `__forward_begin_node`. This means we incorrectly downcast the `__forward_begin_node` pointer to a `__node_pointer`. This downcast itself is sometimes UB but it cannot be safely removed until ABI v2. The more common cause of UB is when we deference the downcast pointer. (for example `__ptr_->__next_`). This can be fixed without an ABI break by upcasting `__ptr_` before accessing it. The fix is as follows: 1. Introduce a `__iter_node_pointer` typedef that works similar to `__link_pointer` in the last patch. In ABI v2 it is always a typedef for `__begin_node_pointer`. 2. Change the `__before_begin()` method to return the correct pointer type (`__begin_node_pointer`), Previously it incorrectly downcasted the `__forward_begin_node` to a `__node_pointer` so it could be used to constructor the iterator types. 3. Change `__forward_list_iterator` and `__forward_list_const_iterator` in the following way: 1. Change `__node_pointer __ptr_;` member to have the `__iter_node_pointer` type instead. 2. Add additional private constructors that accept `__begin_node_pointer` in addition to `__node_pointer` and then correctly cast them to the stored `__iter_node_pointer` type. 3. Add `__get_begin()` and `__get_node_unchecked()` accessor methods that correctly cast `__ptr_` to the expected pointer type. `__get_begin()` is always safe to use and should be preferred. `__get_node_unchecked()` can only be used on a deferencible iterator. 4. Replace direct access to `__forward_list_iterator::__ptr_` with the safe accessor methods. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15836 llvm-svn: 258888
* Add a bunch of missing includes in the test suite to make it more portable. ↵Marshall Clow2016-01-121-0/+1
| | | | | | Fixes bugs #26120 and #26121. Thanks to Jonathan Wakely for the reports and the patches. llvm-svn: 257474
* [libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from ↵Eric Fiselier2015-12-181-0/+51
| | | | | | | K-Ballo. Review: http://reviews.llvm.org/D14839 llvm-svn: 255941
* Add static_assert to set/multiset/map/multimap/forward_list/deque that the ↵Marshall Clow2015-11-264-0/+72
| | | | | | allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this. llvm-svn: 254119
* Remove undefined behavior from tests; specifically, ensure that the value ↵Marshall Clow2015-11-242-6/+6
| | | | | | type of the allocators match the value type of the containers llvm-svn: 254030
* Make it possible to build a no-exceptions variant of libcxx.Asiri Rathnayake2015-11-1010-0/+10
| | | | | | | | | | | | Fixes a small omission in libcxx that prevents libcxx being built when -DLIBCXX_ENABLE_EXCEPTIONS=0 is specified. This patch adds XFAILS to all those tests that are currently failing on the new -fno-exceptions library variant. Follow-up patches will update the tests (progressively) to cope with the new library variant. Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a llvm-svn: 252598
* Suppress array initialization warnings in std::experimental::apply testsEric Fiselier2015-10-0116-23/+46
| | | | llvm-svn: 248987
* Recommit rL245802: Cleanup fancy pointer rebinding in list using ↵Eric Fiselier2015-08-231-0/+27
| | | | | | | | | | | | __rebind_pointer. Currently we need an #ifdef branch every time we use pointer traits to rebind a pointer because it is done differently in C++11 and C++03. This patch introduces the __rebind_pointer utility to clean this up. Also add a test that list and it's iterators can be instantiated with incomplete element types. llvm-svn: 245806
* implement more of N4258 - Cleaning up noexcept in the standard library. ↵Marshall Clow2015-08-182-0/+85
| | | | | | Specifically add new noexcept stuff to vector and string's move-assignment operations llvm-svn: 245330
* Fix a handful of tests that fail in C++03Eric Fiselier2015-07-281-1/+7
| | | | llvm-svn: 243392
* Fix warnings in forwardlistEric Fiselier2015-07-193-6/+6
| | | | llvm-svn: 242633
* Fix warnings in deque testsEric Fiselier2015-07-1910-57/+24
| | | | llvm-svn: 242632
* Commit file missing from r242629Eric Fiselier2015-07-191-0/+8
| | | | llvm-svn: 242630
* Fix warnings in array and assoc containersEric Fiselier2015-07-1815-16/+61
| | | | llvm-svn: 242629
* Add missing instrumentation in vector::insert - Patch from Anna ZaksEric Fiselier2015-07-182-284/+0
| | | | | | This patch was reviewed as D10859. http://reviews.llvm.org/D10859 llvm-svn: 242617
* Move bits from N4258. Mark vector's move-constructor unconditionally ↵Marshall Clow2015-07-142-0/+10
| | | | | | noexcept in C++1z llvm-svn: 242148
* Implement the first part of N4258: 'Cleaning up noexcept in the Library'. ↵Marshall Clow2015-07-135-0/+152
| | | | | | This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates. llvm-svn: 242056
* Fix PR#23767. Add tests for iterator invalidation for ↵Marshall Clow2015-06-054-0/+246
| | | | | | deque::erase/pop_front/pop_back llvm-svn: 239196
* While applying N4258, I forgot about LWG#2455, which modified the ↵Marshall Clow2015-06-043-20/+1
| | | | | | modifications. Correct those - h/t: Howard llvm-svn: 239004
* More N4258 changes. This time vector's constructorsMarshall Clow2015-06-044-5/+48
| | | | llvm-svn: 238990
* Fix broken test I just addedMarshall Clow2015-05-261-3/+3
| | | | llvm-svn: 238234
* Add tests to ensure that string/vector/array have contiguous iterators - ↵Marshall Clow2015-05-262-0/+83
| | | | | | which they did. Mark N4284 as complete llvm-svn: 238233
* Fix test that was failing on C++03 b/c it was using initializer listsMarshall Clow2015-05-161-2/+2
| | | | llvm-svn: 237527
* Remove some debugging printout lines. No functionality change.Marshall Clow2015-05-101-2/+0
| | | | llvm-svn: 236949
* Make the new tests better; make sure that we're testing the case where no ↵Marshall Clow2015-03-302-4/+11
| | | | | | reallocation has to happen llvm-svn: 233641
* While testing Erik's code coverage scripts, I found a hole in the test suite ↵Marshall Clow2015-03-302-16/+74
| | | | | | - vector::assign where a reallocation was not required had no tests. Add some llvm-svn: 233557
* [libcxx] Move tuple_size and tuple_element overloads for pair and array out ↵Eric Fiselier2015-03-172-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of !defined(_LIBCPP_HAS_NO_VARIADICS) block. Summary: There is no reason to guard `tuple_size`, `tuple_element` and `get<I>(...)` for pair and array inside of `<__tuple>` so that they are only available when we have variadic templates. This requires there be redundant declarations and definitions. It also makes it easy to get things wrong. For example the following code should compile (and does in c++11). ``` #define _LIBCPP_HAS_NO_VARIADICS #include <array> int main() { static_assert((std::tuple_size<std::array<int, 10> volatile>::value == 10), ""); } ``` This patch lifts the non-variadic parts of `tuple_size`, `tuple_types`, and `get<I>(...)` to the top of `<__tuple>` where they don't require variadic templates. This patch also removes `<__tuple_03>` because there is no longer a need for it. Reviewers: danalbert, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7774 llvm-svn: 232492
* Use generic feature name for sanitizers that replace new and deleteEric Fiselier2015-03-103-3/+3
| | | | llvm-svn: 231841
* [libcxx] Fix __RAII_IncreaseAnnotator for increases >= 1Eric Fiselier2015-03-101-0/+34
| | | | | | | | | | | | | | Summary: Fix suggested by @mclow.lists on D8109. Store the size of the un-poisoned vector upon construction instead of calculating it later. Reviewers: titus, mclow.lists, kcc, EricWF Reviewed By: EricWF Subscribers: mclow.lists, cfe-commits Differential Revision: http://reviews.llvm.org/D8172 llvm-svn: 231729
* Move test to use correct suffixEric Fiselier2015-03-091-0/+0
| | | | llvm-svn: 231704
OpenPOWER on IntegriCloud