summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* XFAIL variant tests for apple-clangEric Fiselier2016-12-034-4/+5
| | | | llvm-svn: 288559
* Enable warnings by default for C++ >= 11 and fix -Wshadow occurancesEric Fiselier2016-12-0310-45/+42
| | | | llvm-svn: 288557
* Work around Clang 3.8 bugsEric Fiselier2016-12-036-47/+62
| | | | llvm-svn: 288556
* Make variant's index part of the hash valueEric Fiselier2016-12-021-0/+13
| | | | llvm-svn: 288554
* Implement C++17 <variant>. Patch from Michael Park!Eric Fiselier2016-12-0228-164/+803
| | | | | | This patch was reviewed as https://reviews.llvm.org/D23263. llvm-svn: 288547
* Work around a bug in Clang's implementation of noexcept function typesEric Fiselier2016-12-021-1/+5
| | | | llvm-svn: 288544
* Fix copy/paste errors in new variant testsEric Fiselier2016-12-022-6/+6
| | | | llvm-svn: 288538
* Add tests for libc++'s constexpr variant copy/move extensionEric Fiselier2016-12-024-0/+93
| | | | llvm-svn: 288536
* Protect sequences test under libcpp-no-exceptionsRoger Ferrer Ibanez2016-12-012-7/+11
| | | | | | | | Replace throw with TEST_THROW and protect tests that do throw. Also add missing assert(false). Differential Revision: https://reviews.llvm.org/D27252 llvm-svn: 288383
* Protect futures test under libcpp-no-exceptionsRoger Ferrer Ibanez2016-12-011-1/+7
| | | | | | | | Skip tests that expect an exception be thrown. Differential Revision: https://reviews.llvm.org/D27253 llvm-svn: 288382
* Protect optional test under libcpp-no-exceptionsRoger Ferrer Ibanez2016-12-011-3/+6
| | | | | | | | Replace throw with TEST_THROW and skip tests that throw exceptions Differential Revision: https://reviews.llvm.org/D27254 llvm-svn: 288379
* Protect std::ostream::sentry test under libcpp-no-exceptionsRoger Ferrer Ibanez2016-12-011-1/+4
| | | | | | | | Skip test that throws an exception. Differential Revision: https://reviews.llvm.org/D27255 llvm-svn: 288378
* Protect std::array tests under noexceptionsRoger Ferrer Ibanez2016-11-291-3/+14
| | | | | | | | Skip tests that expect exceptions be thrown. Also add missing asserts. Differential Revision: https://reviews.llvm.org/D27095 llvm-svn: 288165
* Protect std::string tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-292-5/+19
| | | | | | | | | Skip tests that expect an exception be thrown and/or disable unreachable catch handlers. Differential Revision: https://reviews.llvm.org/D26612 llvm-svn: 288158
* Protect std::{,unordered_}map tests under noexceptionsRoger Ferrer Ibanez2016-11-292-2/+18
| | | | | | | | Skip tests that use exceptions Differential Revision: https://reviews.llvm.org/D27093 llvm-svn: 288157
* Protect locale tests under noexceptionsRoger Ferrer Ibanez2016-11-294-4/+16
| | | | | | | | Skip tests that expect exceptions be thrown. Differential Revision: https://reviews.llvm.org/D27096 llvm-svn: 288156
* Protect test for dynarray under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-291-1/+6
| | | | | | | | This test expects an exception be thrown. Differential Revision: https://reviews.llvm.org/D26611 llvm-svn: 288155
* Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests ↵Marshall Clow2016-11-263-0/+177
| | | | | | for the ones in std:: llvm-svn: 287988
* Implement the 'detection idiom' from LFTS v2Marshall Clow2016-11-265-0/+224
| | | | llvm-svn: 287981
* Reverting wrong diffRoger Ferrer Ibanez2016-11-242-14/+2
| | | | | | I managed to confuse me with two reviews of the same thing and ended commiting the wrong one. llvm-svn: 287868
* Protect tests for std::uninitialized_{copy,fill} under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-244-8/+44
| | | | | | | | Skip tests that expect an exception be thrown. Differential Revision: https://reviews.llvm.org/D26606 llvm-svn: 287866
* Protect std::string tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-242-2/+14
| | | | | | | | | Skip tests that expect an exception be thrown and/or disable unreachable catch handlers. Differential Revision: https://reviews.llvm.org/D26608 llvm-svn: 287865
* [libcxx] [test] D27027: Strip trailing whitespace.Stephan T. Lavavej2016-11-2358-91/+91
| | | | llvm-svn: 287829
* [libcxx] [test] D27026: Fix copy-paste silliness; ULL can't ever be 32-bit.Stephan T. Lavavej2016-11-231-1/+1
| | | | llvm-svn: 287828
* [libcxx] [test] D27020: Fix MSVC warning C4245 "conversion from 'X' to 'Y', ↵Stephan T. Lavavej2016-11-234-4/+4
| | | | | | | | | | signed/unsigned mismatch", part 7/12. When initializing unsigned integers to their maximum values, change "const T M(~0);" to "const T M(static_cast<T>(-1));". ~0 and -1 are equivalent, but I consider the -1 form to be significantly clearer (and more consistent with other tests). llvm-svn: 287827
* [libcxx] [test] D27019: Fix MSVC warning C4245 "conversion from 'X' to 'Y', ↵Stephan T. Lavavej2016-11-237-15/+15
| | | | | | | | signed/unsigned mismatch", part 6/12. Add static_cast when initializing unsigned integers with negative numbers (in order to obtain big values). llvm-svn: 287826
* [libcxx] [test] D27018: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-234-5/+5
| | | | | | | | | | | | | | | | | | | part 5/12. Various changes: test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp Change M from unsigned to int. It's compared against "int x", and we binary_search() for it within a vector<int>. test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp Add static_cast<unsigned> when comparing int to unsigned. test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp Change unsigned indices to int when we're being given int as a bound. llvm-svn: 287825
* [libcxx] [test] D27016: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-236-19/+25
| | | | | | | | | | part 4/12. Change "int j;" indices to "std::size_t j;". Also, include <cstddef> when it wasn't already being included. llvm-svn: 287824
* [libcxx] [test] D27015: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-2321-29/+29
| | | | | | | | part 3/12. Change unsigned to int in parameters. llvm-svn: 287823
* [libcxx] [test] D27014: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-2320-65/+83
| | | | | | | | | | part 2/12. Add static_cast<std::size_t> when comparing int to std::size_t. Also, include <cstddef> when it wasn't already being included. llvm-svn: 287822
* [libcxx] [test] D27013: Fix MSVC warning C4018 "signed/unsigned mismatch", ↵Stephan T. Lavavej2016-11-23139-210/+349
| | | | | | | | | | part 1/12. Change loop indices from int to std::size_t. Also, include <cstddef> when it wasn't already being included. llvm-svn: 287820
* Fix __hash_table::max_size() on 32 bit systemsEric Fiselier2016-11-231-1/+2
| | | | llvm-svn: 287749
* Don't "LIBCPP_ONLY(stuff;)" at namespace scope.Casey Carter2016-11-231-3/+3
| | | | | | Differential review: https://reviews.llvm.org/D27029 llvm-svn: 287732
* [libcxx] Fix max_size() across all containersEric Fiselier2016-11-2313-100/+391
| | | | | | | | | | | | Summary: The `max_size()` method of containers should respect both the allocator's reported `max_size` and the range of the `difference_type`. This patch makes all containers choose the smallest of those two values. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26885 llvm-svn: 287729
* Add <variant> tests but disable them for libc++Eric Fiselier2016-11-2342-1/+5067
| | | | llvm-svn: 287728
* Attempt to fix stdint/cstdint modules try 2Eric Fiselier2016-11-225-17/+100
| | | | llvm-svn: 287690
* Revert r287435 because of OS X test failuresEric Fiselier2016-11-214-82/+0
| | | | llvm-svn: 287531
* Mark variadic lock guard tests as XFAIL with modules, since they have to ↵Eric Fiselier2016-11-217-1/+24
| | | | | | define macros to expose the new ABI llvm-svn: 287513
* Adjust uses_alloc_types helpers for later changesEric Fiselier2016-11-211-2/+17
| | | | llvm-svn: 287512
* Fix stdint/cstdint modulesEric Fiselier2016-11-194-0/+82
| | | | llvm-svn: 287435
* Mark test as unsupported in C++03Eric Fiselier2016-11-191-0/+1
| | | | llvm-svn: 287417
* [libcxx] Implement locale.h to fix modules buildEric Fiselier2016-11-193-0/+76
| | | | | | | | | | | | | | | | | | Summary: Because `locale.h` isn't part of the libc++ modules the class definitions it provides are exported as part of `__locale` (since it happens to be build first). This breaks `<clocale>` which exports `std::lconv` without including `<__locale>`. This patch implements `locale.h` to fix this issue, it also adds support for testing libc++ with modules. Reviewers: mclow.lists, rsmith, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26826 llvm-svn: 287413
* [libcxx] [test] D26812: In random tests, use real static_asserts and silence ↵Stephan T. Lavavej2016-11-186-20/+84
| | | | | | | | | | | | | a warning. In C++11 mode and newer, use real static_asserts. In C++03 mode, min() and max() aren't constexpr, so use plain asserts. One test triggers MSVC's warning C4310 "cast truncates constant value". The code is valid, and yet the warning is valid, so I'm silencing it through push-disable-pop. llvm-svn: 287391
* [libcxx] [test] D26816: Fix non-Standard assumptions when testing sample().Stephan T. Lavavej2016-11-181-3/+14
| | | | | | | | | | | | | sample() isn't specified with a reproducible algorithm, so expecting exact output is non-Standard. Mark those tests with LIBCPP_ASSERT. In test_small_population(), we're guaranteed to get all of the elements, but not necessarily in their original order. When PopulationCategory is forward, we're guaranteed stability (and can therefore test equal()). Otherwise, we can only test is_permutation(). (As it happens, both libcxx and MSVC's STL provide stability in this scenario for input-only iterators.) llvm-svn: 287383
* [libcxx] [test] D26815: Fix an assumption about the state of moved-from ↵Stephan T. Lavavej2016-11-181-2/+2
| | | | | | | | | | | std::functions. The Standard doesn't provide any guarantees beyond "valid but unspecified" for moved-from std::functions. libcxx moves from small targets and leaves them there, while MSVC's STL empties out the source. Mark these assertions as libcxx-specific. llvm-svn: 287382
* [libcxx] [test] D26813: allocator<const T> is non-Standard.Stephan T. Lavavej2016-11-182-18/+18
| | | | | | | | | | N4582 17.6.3.5 [allocator.requirements] says that allocators are given cv-unqualified object types, and N4582 20.9.9 [default.allocator] implies that allocator<const T> is ill-formed (due to colliding address() overloads). Therefore, tests for allocator<const T> should be marked as libcxx-specific (if not removed outright). llvm-svn: 287381
* Remove files missed in r287250Eric Fiselier2016-11-171-36/+0
| | | | llvm-svn: 287251
* Test changes for P0504R0 "Revisiting in-place tag types for ↵Eric Fiselier2016-11-175-86/+54
| | | | | | any/optional/variant". Patch from Casey Carter llvm-svn: 287249
* Fix -verify tests for older ccache versionsEric Fiselier2016-11-161-2/+8
| | | | llvm-svn: 287109
* [libcxx] Mark xonstexpr-fns.pass.cpp as XFAIL: gcc.Justin Lebar2016-11-151-0/+4
| | | | | | | This fails with gcc because __builtin_isnan and friends, which libcpp_isnan and friends call, are not themselves constexpr-evaluatable. llvm-svn: 287041
OpenPOWER on IntegriCloud