Marshall Clow
4cd596538b
More constexpr (re P0202) - equal and mismatch
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322527 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-16 02:04:10 +00:00
Marshall Clow
5af38a078e
Fix constexpr failure on C++11-based buildbots.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322507 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 19:59:09 +00:00
Marshall Clow
0dc8ca7729
More constexpr from P0202. count and count_if. Also fix a comment that Morwenn noted.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322506 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 19:40:34 +00:00
Marshall Clow
82091c2583
Some of the tests from earlier today had 'int' as the return type when it should have been 'bool'. Fix that. It doesn't change the behavior of any of the tests, but it's more accurate.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322505 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 19:32:32 +00:00
Marshall Clow
6a1c2ffea4
More P0202 constexpr-ifying. All the find_XXX algorithms in this commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322504 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 19:26:05 +00:00
Marshall Clow
bb8010f6f2
partition_point gets the P0202 treatment
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322493 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 17:53:34 +00:00
Marshall Clow
de4b2869d7
More constexpr algorithms from P0202. any_of/all_of/none_of.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322492 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 17:20:36 +00:00
Marshall Clow
8d0d82585a
First part of P0202: Adding constexpr modifiers to functions in <algorithm> and <utility>. This commit is all the is_XXX algorithms.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322489 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-15 16:16:32 +00:00
Marshall Clow
210d12c946
Fix misspelled macro name - thanks to andrew@ispras.ru for the catch
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322196 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-10 16:25:04 +00:00
Marshall Clow
334063336b
Add the C++17 extensions to std::search. Include the default searcher, but not the Boyer-Moore or Boyer-Moore-Horspool searcher (yet). BUT put the BM and BMH tests in place, marked to XFAIL. The other searchers will follow soon
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322019 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-08 19:18:00 +00:00
Billy Robert O'Neal III
7e250fcdc1
Change (void) casts to TEST_IGNORE_NODISCARD, as requested by Eric. Reviewed as https://reviews.llvm.org/D40065
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318804 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 21:37:26 +00:00
Billy Robert O'Neal III
b981667776
Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318277 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-15 07:45:07 +00:00
Stephan T. Lavavej
5d91f314f1
[libcxx] [test] Change comments to say C++ instead of c++. NFC.
...
This makes them consistent (many comments already used uppercase).
The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309468 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 00:55:35 +00:00
Stephan T. Lavavej
a686caad20
[libcxx] [test] Untabify, NFC.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309464 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 00:55:10 +00:00
Stephan T. Lavavej
b836deb5db
[libcxx] [test] Strip trailing whitespace. NFC.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-20 21:00:02 +00:00
Marshall Clow
10411c1626
Add non-parallel version of for_each_n (+tests) from the Parallelism TS
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303833 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 02:29:54 +00:00
Stephan T. Lavavej
559442652c
[libcxx] [test] Strip trailing whitespace. NFC.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:43:58 +00:00
Marshall Clow
50e32f569c
Update the algorithm tests to not use the (deprecated) function binders. No functional change.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298618 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 16:13:50 +00:00
Stephan T. Lavavej
3bea61851a
[libcxx] [test] D27023: Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12.
...
Add static_cast<int>. In these cases, the values are guaranteed to be small-ish,
and they're being compared to int elements.
test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
Use int instead of unsigned to iterate from 0 to 10.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 01:13:29 +00:00
Eric Fiselier
fd1c9dddcc
Purge all usages of _LIBCPP_STD_VER under test/std/algorithm
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283643 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-08 01:25:23 +00:00
Eric Fiselier
84acb1ec3f
Remove trailing whitespace in test suite. Approved by Marshall Clow.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 21:35:39 +00:00
Eric Fiselier
3a07a2f4f3
Fix warnings in test/std/algorithms
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242626 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-18 21:53:16 +00:00
Eric Fiselier
31cb7fe75e
[libcxx] Properly convert the count arguments to the *_n algorithms before use.
...
Summary:
The requirement on the `Size` type passed to *_n algorithms is that it is convertible to an integral type. This means we can't use a variable of type `Size` directly. Instead we need to convert it to an integral type first. The problem is finding out what integral type to convert it to. `__convert_to_integral` figures out what integral type to convert it to and performs the conversion, It also promotes the resulting integral type so that it is at least as big as an integer. `__convert_to_integral` also has a special case for converting enums. This should only work on non-scoped enumerations because it does not apply an explicit conversion from the enum to its underlying type.
Reviewers: chandlerc, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7449
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228704 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 16:46:42 +00:00
Marshall Clow
eea9d20edb
Removed some tabs that snuck into the test suite. No functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227363 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 20:26:11 +00:00
Eric Fiselier
a90c6dd460
Move test into test/std subdirectory.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20 01:40:03 +00:00