Marshall Clow
862af58793
Added vector<T>::insert tests suggested by code coverage results
...
llvm-svn: 221689
2014-11-11 16:44:05 +00:00
Marshall Clow
a773ab1d8d
EricQWF's code coverage work showed that none of the libc++ tests were exercising some code in vector<bool>. Add more tests in an attempt to get better coverage
...
llvm-svn: 221644
2014-11-11 00:16:30 +00:00
Eric Fiselier
652a3f3257
Actually mark the tests an unsupported with MSAN (not just ASAN)
...
llvm-svn: 221240
2014-11-04 05:36:15 +00:00
Eric Fiselier
446e4b6be1
Mark tests that replace operator new/delete as UNSUPPORTED with ASAN and MSAN.
...
tests that replace operator new/delete won't link when using ASAN and MSAN
because these sanitizers also replace new/delete.
llvm-svn: 221236
2014-11-04 05:11:41 +00:00
Eric Fiselier
910285b238
[libcxx] Fix use of operator comma where the types can be user defined
...
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
2014-10-27 19:28:20 +00:00
Eric Fiselier
ac97f7ce7c
Fix unused variables in tests to placate scan-build. Patch from Steve MacKenzie.
...
llvm-svn: 220154
2014-10-19 00:10:15 +00:00
Marshall Clow
c8528b5001
Whitespace maintenance. Remove a bunch of tabs that snuck in. No functionality change
...
llvm-svn: 220142
2014-10-18 11:03:33 +00:00
Kostya Serebryany
3f0e834842
[asan] Make vector asan annotations exception-friendly
...
Fix vector asan annotations with RAII.
Add a test.
Also, remove one dead function.
Review: http://reviews.llvm.org/D4170
llvm-svn: 216995
2014-09-02 23:43:38 +00:00
Marshall Clow
0aacbc92df
Fix bug 20740 - std::set/std::map don't support heterogeneous lookup for count(). Thanks to Jim Porter for the bug report
...
llvm-svn: 216353
2014-08-24 23:54:16 +00:00
David Blaikie
c6dbc22b9b
Revert "Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state."
...
Premature commit due to misreading CR feedback.
This reverts commit r215301.
llvm-svn: 215302
2014-08-09 22:42:19 +00:00
David Blaikie
f63d5fa236
Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state.
...
Some tests were constructing it with 0, so use -1 as the invalid state
instead.
Reviewers: Marshall Clow
Differential Revision: http://reviews.llvm.org/D4095
llvm-svn: 215301
2014-08-09 22:35:47 +00:00
Marshall Clow
99d2df956d
Apply a similar fix to <forward_list> as I did for <list> in r215210. Again, thanks to Ion Gaztañaga for noticing this problem w.r.t LWG#526
...
llvm-svn: 215213
2014-08-08 15:58:00 +00:00
Marshall Clow
ced70066c2
While reading LWG#526, Ion Gaztañaga noticed that libc++ didn't correctly 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
2014-08-08 15:35:52 +00:00
Marshall Clow
90ba0533cd
Fix PR#202520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm
...
llvm-svn: 214736
2014-08-04 17:32:25 +00:00
Marshall Clow
56cca89fc3
Fix some failing tests for the standard containers. The tests were failing 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
2014-07-08 15:19:40 +00:00
Alp Toker
281dfe85d3
Fix typo 'fourty' in tests
...
llvm-svn: 208870
2014-05-15 11:33:29 +00:00
Marshall Clow
5c520bd985
Add Address Sanitizer support to std::vector
...
llvm-svn: 208319
2014-05-08 14:14:06 +00:00
Marshall Clow
0fc6e981b0
Fix PR 19663. Some calls to find(vector<bool>) were returning iterators that were subtly invalid (didn't compare equal). Thanks to Erik Verbruggen for the report (and diagnosis)
...
llvm-svn: 208096
2014-05-06 15:33:23 +00:00
Marshall Clow
b708306128
Patch from Steve MacKenzie to make the libc++ tests play nicely with MSVC's STL. Add '#include <functional>' to four of the priority queue tests.
...
llvm-svn: 203584
2014-03-11 16:22:53 +00:00
Marshall Clow
17af2f56ab
Add tests for LWG issue #2356 . Stability of erasure in unordered associative containers. Libc++ already does this, but now we have tests for it.
...
llvm-svn: 203494
2014-03-10 21:36:36 +00:00
Marshall Clow
988a4e8d0e
More tests for LWG Issue #2263 ; this time to the associative and unordered containers. Still no changes to libc++
...
llvm-svn: 203480
2014-03-10 19:18:49 +00:00
Marshall Clow
9f60718286
Added tests to the sequence containers for for LWG Issue #2263 . Comparing iterators and allocator pointers with different const-character. No changes to libc++
...
llvm-svn: 203479
2014-03-10 18:54:56 +00:00
Marshall Clow
78a87e8a68
Implement LWG 2193. Default constructors for standard library containers are 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
2014-03-05 19:06:20 +00:00
Marshall Clow
d9e7cf3efd
LWG issue #2252 : Add more tests for exception safety. No changes needed in the library
...
llvm-svn: 202885
2014-03-04 20:31:21 +00:00
Marshall Clow
cdf2fae610
Add a test to make sure that vector supports incomplete types
...
llvm-svn: 201349
2014-02-13 17:56:12 +00:00
Marshall Clow
74cf6ff5e5
Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
...
llvm-svn: 201021
2014-02-08 04:03:14 +00:00
Peter Collingbourne
09df4a6675
Support forward_list<Incomplete Type>. Patch by Zhihao Yuan!
...
llvm-svn: 200814
2014-02-05 01:44:17 +00:00
Marshall Clow
354d39cabc
Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch.
...
llvm-svn: 199400
2014-01-16 16:58:45 +00:00
Marshall Clow
c3deeb5f89
Found six (nmostly) identical files named 'test_allocator.h' in the libcxx 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
2013-12-03 00:18:10 +00:00
Marshall Clow
a26fcc7989
Found two identical files named 'DefaultOnly.h' in the libcxx test suite. Moved one to /support, removed the other, and iupdated all the includes. No functionality change
...
llvm-svn: 196118
2013-12-02 17:00:56 +00:00
Marshall Clow
3772a46ab4
Fix for PRPR17934; based on a fix suggested by Peter Sommerlad
...
llvm-svn: 196058
2013-12-02 03:24:33 +00:00
Marshall Clow
e34f6f6a12
There were two identical files named 'min_allocator.h'. Move one of them to /support and delete the other. Then adjust all the tests that used them to include the moved one. No functionality change.
...
llvm-svn: 195785
2013-11-26 20:58:02 +00:00
Marshall Clow
21fee96f69
Move <dynarray> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
...
llvm-svn: 194614
2013-11-13 22:44:48 +00:00
Marshall Clow
45b983c4d0
Part 8 of LWG Issue 2210' unordered_set and unordered multiset; this got missed when I went on vacation
...
llvm-svn: 191705
2013-09-30 21:33:51 +00:00
Howard Hinnant
9fd9f84f48
SCARY/N2913 iterator support between the multi and non-multi versions of the associative and unordered containers. I beleive lack of support for this was accidentally recently introduced (by me) and this is fixing a regression. This time tests are put in to prevent such a regression in the future.
...
llvm-svn: 191692
2013-09-30 19:08:22 +00:00
Howard Hinnant
7a828034c6
Peter Collingbourne: If a pointer is passed as the third argument of the (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
2013-09-21 21:13:54 +00:00
Marshall Clow
a369cb6280
LWG Issue 2210 (Part #7 ): vector and vector<bool>
...
llvm-svn: 190736
2013-09-14 00:47:59 +00:00
Marshall Clow
ef6f1151b0
Initial implementation of <dynarray>. No allocator support pending resolution of LWG #2235 ; no stack allocation pending compiler support
...
llvm-svn: 190697
2013-09-13 15:22:55 +00:00
Marshall Clow
3cd37e6456
LWG Issue 2210 (Part #6 ): unordered_map and unordered_multimap
...
llvm-svn: 190576
2013-09-12 03:00:31 +00:00
Howard Hinnant
872ac4b5f0
A collection of minor type-o fixes. The first two aren't testable, but all 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
2013-09-12 00:10:44 +00:00
Marshall Clow
fbc317d480
LWG Issue #2210 Part 5 - map/multimap; no, really - the last one was set/multiset. THIS is map/multimap
...
llvm-svn: 190474
2013-09-11 01:15:47 +00:00
Marshall Clow
0a55d17bcd
LWG Issue #2210 Part 4 - map/multimap
...
llvm-svn: 190454
2013-09-11 00:06:45 +00:00
Marshall Clow
cdd01917ff
Remove a tab that snuck in
...
llvm-svn: 190283
2013-09-08 21:13:57 +00:00
Howard Hinnant
224ccb38d3
Fix minor type-o in tests.
...
llvm-svn: 190280
2013-09-08 19:28:51 +00:00
Marshall Clow
fb8297668f
LWG Issue 2210 (Part #2 & #3 ): list and forward_list
...
llvm-svn: 190279
2013-09-08 19:11:51 +00:00
Marshall Clow
630c5e535c
LWG Issue 2210 (Part #1 ): deque
...
llvm-svn: 190251
2013-09-07 16:16:19 +00:00
Howard Hinnant
145afa17ca
Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.
...
llvm-svn: 189140
2013-08-23 20:10:18 +00:00
Marshall Clow
2d6e2834a8
Implement LWG Issue #2187 (emplace_back and emplace for vector<bool>)
...
llvm-svn: 188333
2013-08-13 23:54:12 +00:00
Marshall Clow
2585835c3b
Second half (map/multimap) of N3657
...
llvm-svn: 188320
2013-08-13 22:18:47 +00:00
Marshall Clow
25d3402c6a
First half of support for N3657; heterogenous lookups for set/multiset
...
llvm-svn: 188241
2013-08-13 01:11:06 +00:00