summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/containers
Commit message (Collapse)AuthorAgeFilesLines
* Add missing include that caused a test failure on Windows. Thanks to STL for ↵Marshall Clow2016-08-221-0/+1
| | | | | | the patch. No functional change. llvm-svn: 279453
* make the associative containers do the right thing for ↵Marshall Clow2016-08-171-0/+158
| | | | | | propogate_on_container_assignment. Fixes bug #29001. Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure. llvm-svn: 279008
* Support allocators with explicit conversion constructors. Fixes bug #29000Marshall Clow2016-08-1737-3/+974
| | | | llvm-svn: 278904
* Fix compile error due to mismatched iterator types. Patch from STL@microsoft.comEric Fiselier2016-08-031-1/+1
| | | | llvm-svn: 277574
* Make dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.comEric Fiselier2016-07-2513-17/+30
| | | | llvm-svn: 276595
* Mark bucket_count() assertions as non-portable. Patch from STL@microsoft.comEric Fiselier2016-07-25107-349/+458
| | | | llvm-svn: 276593
* Make move_assign_noexcept.pass.cpp tests more portable. Patch from ↵Eric Fiselier2016-07-2512-18/+30
| | | | | | STL@microsoft.com llvm-svn: 276591
* Make swap_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com.Eric Fiselier2016-07-2516-246/+142
| | | | | | See D21820 for more information (https://reviews.llvm.org/D21820). llvm-svn: 276590
* Fix a non-standard allocator in vector tests. Patch from STL@microsoft.comEric Fiselier2016-07-241-0/+3
| | | | llvm-svn: 276588
* Mark bucket() assertions as non-portable. Patch from STL@microsoft.comEric Fiselier2016-07-244-8/+12
| | | | llvm-svn: 276584
* Make move_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.comEric Fiselier2016-07-2414-39/+53
| | | | llvm-svn: 276581
* Make bucket_count() greater-equal assertions portable. Patch from ↵Eric Fiselier2016-07-244-7/+7
| | | | | | STL@microsoft.com llvm-svn: 276580
* Mark bucket_size() assertions as non-portible. Patch from STL@microsoft.comEric Fiselier2016-07-244-48/+52
| | | | llvm-svn: 276578
* Implement P0084r2. Changing emplace return types.Eric Fiselier2016-07-219-80/+104
| | | | llvm-svn: 276230
* Fix undefined behavior in __treeEric Fiselier2016-07-191-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to fix the undefined behavior in __tree by changing the node pointer types used throughout. The pointer types are changed for raw pointers in the current ABI and for fancy pointers in ABI V2 (since the fancy pointer types may not be ABI compatible). The UB in `__tree` arises because tree downcasts the embedded end node and then deferences that pointer. Currently there are 3 node types in __tree. * `__tree_end_node` which contains the `__left_` pointer. This node is embedded within the container. * `__tree_node_base` which contains `__right_`, `__parent_` and `__is_black`. This node is used throughout the tree rebalancing algorithms. * `__tree_node` which contains `__value_`. Currently `__tree` stores the start of the tree, `__begin_node_`, as a pointer to a `__tree_node`. Additionally the iterators store their position as a pointer to a `__tree_node`. In both of these cases the pointee can be the end node. This is fixed by changing them to store `__tree_end_node` pointers instead. To make this change I introduced an `__iter_pointer` typedef which is defined to be a pointer to either `__tree_end_node` in the new ABI or `__tree_node` in the current one. Both `__tree::__begin_node_` and iterator pointers are now stored as `__iter_pointers`. The other situation where `__tree_end_node` is stored as the wrong type is in `__tree_node_base::__parent_`. Currently `__left_`, `__right_`, and `__parent_` are all `__tree_node_base` pointers. Since the end node will only be stored in `__parent_` the fix is to change `__parent_` to be a pointer to `__tree_end_node`. To make this change I introduced a `__parent_pointer` typedef which is defined to be a pointer to either `__tree_end_node` in the new ABI or `__tree_node_base` in the current one. Note that in the new ABI `__iter_pointer` and `__parent_pointer` are the same type (but not in the old one). The confusion between these two types is unfortunate but it was the best solution I could come up with that maintains the ABI. The typedef changes force a ton of explicit type casts to correct pointer types and to make current code compatible with both the old and new pointer typedefs. This is the bulk of the change and it's really messy. Unfortunately I don't know how to avoid it. Please let me know what you think. Reviewers: howard.hinnant, mclow.lists Subscribers: howard.hinnant, bbannier, cfe-commits Differential Revision: https://reviews.llvm.org/D20786 llvm-svn: 276003
* Add includes in test. Patch from STL@microsoft.comEric Fiselier2016-07-181-0/+4
| | | | llvm-svn: 275751
* Always use the allocator to construct/destruct elements of a deque/vector. ↵Marshall Clow2016-07-112-0/+21
| | | | | | Fixes PR#28412. Thanks to Jonathan Wakely for the report. llvm-svn: 275105
* Fix static assert problem on gcc; remove XFAILs that I put in in r274250Marshall Clow2016-06-306-12/+0
| | | | llvm-svn: 274285
* Fix C++03 build.Eric Fiselier2016-06-304-1/+13
| | | | llvm-svn: 274274
* Temporarily XFAIL the incomplete type tests for GCC while I figure out why ↵Marshall Clow2016-06-306-0/+12
| | | | | | adding a static_assert in r274235 broken them llvm-svn: 274250
* Implement LWG#2684: 'priority_queue lacking comparator typedef'. We already ↵Marshall Clow2016-06-301-0/+4
| | | | | | did this, just added tests llvm-svn: 274243
* Implement LWG#2596: 'vector::data() should use addressof'Marshall Clow2016-06-302-3/+41
| | | | llvm-svn: 274241
* Implement LWG#2436: 'Comparators for associative containers should always be ↵Marshall Clow2016-06-3012-0/+348
| | | | | | CopyConstructible' llvm-svn: 274235
* Make std::array typedef tests more portable.Eric Fiselier2016-06-301-4/+25
| | | | llvm-svn: 274210
* Fix unary_function inheritance assumption. Patch from STL@microsoft.comEric Fiselier2016-06-301-2/+2
| | | | llvm-svn: 274205
* Make default_noexcept.pass.cpp container tests more portable. Patch from ↵Eric Fiselier2016-06-2615-27/+42
| | | | | | STL@microsoft.com llvm-svn: 273823
* Finish converting list _LIBCPP_DEBUG tests.Eric Fiselier2016-06-225-81/+7
| | | | llvm-svn: 273394
* Cleanup _LIBCPP_DEBUG tests in std::list. More to come.Eric Fiselier2016-06-2211-515/+7
| | | | llvm-svn: 273393
* Cleanup [list.modifiers] tests.Eric Fiselier2016-06-229-566/+53
| | | | llvm-svn: 273371
* Move remaining _LIBCPP_VERSION tests into test/libcxxEric Fiselier2016-06-2211-220/+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-14635-768/+716
| | | | | | | | | 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
* Found a couple bugs in the test suite. No functionality change.Marshall Clow2016-06-142-0/+4
| | | | llvm-svn: 272679
* Fix vector<bool> tests that were using ints. Patch from STL@microsoft.comEric Fiselier2016-06-145-17/+17
| | | | llvm-svn: 272620
* Make the comparison objects that we pass in for various tests look more like ↵Marshall Clow2016-06-0940-28/+48
| | | | | | actual comparison objects. No functional change. llvm-svn: 272288
* Avoid Shadowing warnings in the associative containers tests. Thanks to STL ↵Marshall Clow2016-06-074-4/+8
| | | | | | for the patch. llvm-svn: 272018
* [libcxx] Fix c++98 test failures.Asiri Rathnayake2016-06-0312-13/+13
| | | | | | | | | Adds XFAIL/UNSUPPORTED lit tags as appropriate. Gets a clean test run for -std=c++98 on Fedora 20. NFC. llvm-svn: 271741
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-01126-543/+543
| | | | llvm-svn: 271435
* Mark LWG issue 2537 as completeEric Fiselier2016-05-312-4/+6
| | | | llvm-svn: 271241
* 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-2916-756/+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
* Add braces, move braces, and rename variables to avoid shadowing. Patch from ↵Eric Fiselier2016-04-283-2/+6
| | | | | | STL@microsoft.com llvm-svn: 267844
* Fix = that should have been == in test. Thanks to STL@microsoft for the catchMarshall Clow2016-04-271-1/+1
| | | | llvm-svn: 267654
* Fix some non-standard parts of our test suite. Reported by STLEric Fiselier2016-04-2215-3798/+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-2213-34/+39
| | | | llvm-svn: 267085
* Add is_swappable/is_nothrow_swappable traitsEric Fiselier2016-04-212-0/+50
| | | | llvm-svn: 267079
OpenPOWER on IntegriCloud