summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert commit r347904 because it broke older compilersMarshall Clow2018-11-2933-168/+0
| | | | llvm-svn: 347908
* First part of P0482 - Establish that char8_t is an integral type, and that ↵Marshall Clow2018-11-2933-0/+168
| | | | | | numeric_limits<char8_t> is valid and sane. llvm-svn: 347904
* Revert "Move internal usages of `alignof`/`__alignof` to use ↵Eric Fiselier2018-11-282-3/+8
| | | | | | | | | | | `_LIBCPP_ALIGNOF`. " This reverts commit 087f065cb0c7463f521a62599884493aaee2ea12. The tests were failing on 32 bit builds, and I don't have time to clean them up right now. I'll recommit tomorrow with fixed tests. llvm-svn: 347816
* Implement P0966 - string::reserve should not shrinkMarshall Clow2018-11-281-1/+8
| | | | llvm-svn: 347789
* Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`. Eric Fiselier2018-11-282-8/+3
| | | | | | | | | | | | | | | | | | | | | Summary: Starting in Clang 8.0 and GCC 8.0, `alignof` and `__alignof` return different values in same cases. Specifically `alignof` and `_Alignof` return the minimum alignment for a type, where as `__alignof` returns the preferred alignment. libc++ currently uses `__alignof` but means to use `alignof`. See llvm.org/PR39713 This patch introduces the macro `_LIBCPP_ALIGNOF` so we can control which spelling gets used. This patch does not introduce any ABI guard to provide the old behavior with newer compilers. However, if we decide that is needed, this patch makes it trivial to implement. I think we should commit this change immediately, and decide what we want to do about the ABI afterwards. Reviewers: ldionne, EricWF Reviewed By: EricWF Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D54814 llvm-svn: 347787
* [libcxx] Use clang-verify in the lit test suite even when availability is ↵Louis Dionne2018-11-283-0/+12
| | | | | | enabled llvm-svn: 347780
* Implement P1085R2 - Should Span be Regular?. This consists entirely of deletionsMarshall Clow2018-11-276-950/+0
| | | | llvm-svn: 347672
* [libcxx] Fix XFAILs for aligned allocation testsLouis Dionne2018-11-268-132/+152
| | | | | | | | | | In r339743, I marked several aligned allocation tests as downright unsupported on macosx in an attempt to unbreak the build. It turns out that marking them as unuspported whenever we're on OS X is way too coarse grained. This commit marks the tests as XFAIL with more granularity. llvm-svn: 347585
* [libcxx] Use a type that is always an aggregate in variant's testsLouis Dionne2018-11-263-25/+28
| | | | | | | | | | | | | | | | | | | | | Summary: In PR39232, we noticed that some variant tests started failing in C++2a mode with recent Clangs, because the rules for literal types changed in C++2a. As a result, a temporary fix was checked in (enabling the test only in C++17). This commit is what I believe should be the long term fix: I removed the tests that checked constexpr default-constructibility with a weird type from the tests for index() and valueless_by_exception(), and instead I added tests for those using an obviously literal type in the test for the default constructor. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, arphaman, libcxx-commits, rsmith Differential Revision: https://reviews.llvm.org/D54767 llvm-svn: 347568
* [libcxx] Reintroduce UNSUPPORTED annotation for strstreambuf overflow testLouis Dionne2018-11-221-0/+4
| | | | | | | | | | | This is a revert of r347421, except I'm using the with_system_cxx_lib lit feature instead of availability to mark the test as unsupported (because the problem is a bug in the dylib itself). In r347421, I said I wasn't able to reproduce the issue and that's why I was removing it: this was because I ran lit slightly wrong. The problem mentioned really exists. llvm-svn: 347475
* [libcxx] Add XFAIL for test on OS X 10.12 to 10.14Louis Dionne2018-11-221-0/+6
| | | | llvm-svn: 347473
* [libcxx] Remove incorrect XFAIL on macos 10.12Louis Dionne2018-11-221-1/+0
| | | | llvm-svn: 347461
* [libcxx] Fix incorrect iterator type in vector container testLouis Dionne2018-11-211-24/+32
| | | | | | | | | | | | The iterator types for different specializations of containers with the same element type but different allocators are not required to be convertible. This patch makes the test to take the iterator type from the same container specialization as the created container. Reviewed as https://reviews.llvm.org/D54806. Thanks to Andrey Maksimov for the patch. llvm-svn: 347423
* [libcxx] Mark strstreams tests as being supported on all OS X versionsLouis Dionne2018-11-211-4/+0
| | | | | | | | | | | | | | | I wasn't able to reproduce the issue referred to by the comment using the libc++'s shipped with mac OS X 10.7 and 10.8, so I assume this may have been fixed in a function that is now shipped in the headers. In that case, the tests will pass no matter what dylib we're using. In the worst case, some test bots will start failing and I'll understand why I was wrong, and I can create an actual lit feature for it. Note that I could just leave this test alone, but this change is on the path towards eradicating vendor-specific availability markup from the test suite. llvm-svn: 347421
* [libc++] Implement P0487R1 - Fixing operator>>(basic_istream&, CharT*)Zhihao Yuan2018-11-213-0/+77
| | | | | | | | | | | | | | | | | | | Summary: Avoid buffer overflow by replacing the pointer interface with an array reference interface in C++2a. Tentatively ready on Batavia2018. https://wg21.link/lwg2499 https://wg21.link/p0487 Reviewers: mclow.lists, ldionne, EricWF Reviewed By: ldionne Subscribers: libcxx-commits, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D51268 llvm-svn: 347377
* [NFC] Rename lit feature to '-fsized-deallocation' for consistencyLouis Dionne2018-11-212-2/+2
| | | | | | | The '-faligned-allocation' flag uses a feature with the same name (with a leading dash). llvm-svn: 347367
* A couple of tests were broken when clang implemented the compiler parts of ↵Marshall Clow2018-11-202-0/+34
| | | | | | P0482 (support for char8_t). Comment out those bits until we implement the corresponding bits in libc++ llvm-svn: 347360
* Mark P0771 as complete; we already did this - I just added tests to be sureMarshall Clow2018-11-201-1/+13
| | | | llvm-svn: 347343
* [libcxx] Fix XFAIL for GCC 4.9Louis Dionne2018-11-191-1/+1
| | | | | | | | | The XFAIL started passing since we're only testing for trivial-copyability of reference_wrapper in C++14 and above. This commit constrains the XFAIL to gcc-4.9 with C++14 (it would also fail on C++17 and above, but those standards are not available with GCC 4.9). llvm-svn: 347264
* [libcxx] Update test of trivial copyability of reference_wrapperLouis Dionne2018-11-191-3/+4
| | | | | | N4151 is not an extension anymore, it was standardized in C++14. llvm-svn: 347263
* [libcxx] Fix incorrect #include for std::hashLouis Dionne2018-11-191-1/+1
| | | | | | | Reviewed as https://reviews.llvm.org/D54705. Thanks to Andrey Maksimov for the patch. llvm-svn: 347233
* [libcxx] Add missing <cstddef> includes in testsLouis Dionne2018-11-193-0/+4
| | | | | | | | | | | Some tests use type std::max_align_t, but don't include <cstddef> header directly. As a result, these tests won't compile against some conformant libraries. Reviewed as https://reviews.llvm.org/D54645. Thanks to Andrey Maksimov for the patch. llvm-svn: 347232
* [libcxx] Add availability markup for bad_optional_access, bad_variant_access ↵Louis Dionne2018-11-1945-240/+322
| | | | | | | | | | | | and bad_any_cast Reviewers: dexonsmith, EricWF Subscribers: christof, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D53256 llvm-svn: 347219
* [libcxx] Add missing includes in testsLouis Dionne2018-11-1621-0/+24
| | | | | | | | | | | | | | | A bunch of unordered containers tests call library functions but don't directly include the corresponding header files: - fabs() (defined in <cmath> which is not included); - is_permutation() (defined in <algorithm> which is not included); - next() (defined in <iterator> which is not included). - As a result, these tests won't compile against some conformant libraries. Reviewed as https://reviews.llvm.org/D54643. Thanks to Andrey Maksimov for the patch. llvm-svn: 347085
* Get tests compiling with -Wunused-local-typedefEric Fiselier2018-11-1544-76/+2
| | | | llvm-svn: 346914
* [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.Stephan T. Lavavej2018-11-144-20/+0
| | | | | | C++11's [hash.requirements] never required these typedefs from users. llvm-svn: 346912
* [libcxx] [test] Include <cassert> for assert().Stephan T. Lavavej2018-11-148-0/+8
| | | | | | This fixes compiler errors with MSVC's STL. llvm-svn: 346911
* [libcxx] [test] Fix MSVC warning C4800.Stephan T. Lavavej2018-11-141-6/+6
| | | | | | | | | | | | This was implicitly converting [1, 3] to bool, which triggers an MSVC warning. The test should just pass `true`, which is simpler, has the same behavior, and avoids the warning. (This is a library test, not a compiler test, and the conversion happens before calling `push_back`, so passing [1, 3] isn't interesting in any way. This resembles a previous change to stop passing `1 == 1` in the `vector<bool>` tests.) llvm-svn: 346910
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-11-14163-537/+536
| | | | llvm-svn: 346826
* Implement P0972R0: <chrono> zero(), min(), and max() should be noexcept. ↵Marshall Clow2018-11-138-8/+57
| | | | | | Reviewed as https://reviews.llvm.org/D53828 llvm-svn: 346766
* [libcxx] Implement http://wg21.link/p1006, constexpr in pointer_traitsLouis Dionne2018-11-131-3/+14
| | | | | | | | | | | | | | | | Summary: P1006 adds support for constexpr in the specialization of pointer_traits for raw pointers. This is necessary in order to use pointer_traits in the upcoming constexpr containers. We expect P1006 to be voted into the working draft for C++20 at the San Diego meeting. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D53867 llvm-svn: 346764
* Add emplace tests for multiset/unordered_multiset.Eric Fiselier2018-11-133-1/+46
| | | | | | | | This patch adds tests to ensure that multiset/unordered_multiset's emplace method correctly constructs the elements without any intervening constructions. llvm-svn: 346743
* Fix PR39619 - iterator_traits isn't SFINAE-friendly enough. Thanks to Eric ↵Marshall Clow2018-11-132-0/+123
| | | | | | for the report llvm-svn: 346738
* [NFC] Reformat std::optional testsLouis Dionne2018-11-122-4/+4
| | | | llvm-svn: 346630
* Second half of C++17's splicing maps and setsErik Pilkington2018-10-318-0/+1232
| | | | | | | | | | This commit adds a merge member function to all the map and set containers, which splices nodes from the source container. This completes support for P0083r3. Differential revision: https://reviews.llvm.org/D48896 llvm-svn: 345744
* Work around gcc.gnu.org/PR87766Eric Fiselier2018-10-261-1/+1
| | | | llvm-svn: 345425
* Adjust unsupported C++ versions in some testsMikhail Maltsev2018-10-24176-176/+176
| | | | | | | | | | | | | | | | | | | | Summary: Some tests (mainly the new C++20 calendar library) fail when libc++ is tested with '--param=std=c++98'. The failures happen because the tests actually don't support C++98, but don't mention C++98 in the 'UNSUPPORTED:' line. This change fixes the issue. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: arphaman, michaelplatings, libcxx-commits Differential Revision: https://reviews.llvm.org/D53640 llvm-svn: 345148
* Mark the move construct/move assign tests as unsupported on C++03Marshall Clow2018-10-232-1/+2
| | | | llvm-svn: 345001
* Add tests for match_results copy/move assignment operators. NFCMarshall Clow2018-10-233-0/+106
| | | | llvm-svn: 344998
* Remove a 'const' from the synopsis. NFCMarshall Clow2018-10-231-1/+1
| | | | llvm-svn: 344997
* Add tests for match_results copy/move construction. NFCMarshall Clow2018-10-232-0/+83
| | | | llvm-svn: 344988
* Update commnents to reflect the changes for LWG#3127. NFCMarshall Clow2018-10-222-1/+31
| | | | llvm-svn: 344951
* Update commnents to reflect the changes for LWG#3122. NFCMarshall Clow2018-10-222-0/+2
| | | | llvm-svn: 344950
* [libcxx] [test] Don't detect Windows' UCRT with TEST_COMPILER_C1XXBilly Robert O'Neal III2018-10-202-7/+3
| | | | | | The test is trying to avoid saying aligned_alloc on Windows' UCRT, which does not (and can not) implement aligned_alloc. However, it's testing for c1xx, meaning clang on Windows will fail this test when using the UCRT. llvm-svn: 344829
* [libcxx] [test] Add missing <stdexcept> to map at tests.Billy Robert O'Neal III2018-10-192-3/+5
| | | | | | Reviewed as https://reviews.llvm.org/D50551 llvm-svn: 344821
* Repair thread-unsafe modifications of n_alive in F.pass.cppBilly Robert O'Neal III2018-10-191-4/+10
| | | | | | | | In this example, the ctor of G runs in the main thread in the expression G(), and also in the copy ctor of G() in the DECAY_COPY inside std::thread. The main thread destroys the G() instance at the semicolon, and the started thread destroys the G() after it returns. Thus there is a race between the threads on the n_alive variable. The fix is to join with the background thread before attempting to destroy the G in the main thread. llvm-svn: 344820
* [libcxx] Mark chrono literal unit tests as being unsupported on AppleClang 10Louis Dionne2018-10-174-4/+4
| | | | llvm-svn: 344661
* Recommit <chrono> changes with a couple xtra tests marked to fail on apple's ↵Marshall Clow2018-10-16178-1/+9864
| | | | | | clang. Reviewed as D51762 llvm-svn: 344627
* Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..."Artem Dergachev2018-10-162-2/+6
| | | | | | Reverted too much in r344580. llvm-svn: 344582
* Revert r344529 "Implement the first part of the calendar support for C++20"Artem Dergachev2018-10-16181-9927/+2
| | | | | | | | | | Revert r344535 "Wrap up the new chrono literals in an #ifdef..." Revert r344546 "Mark a couple of test cases as 'C++17-only'..." Some of the buildbot failures were masked by another error, and this one was probably missed. llvm-svn: 344580
OpenPOWER on IntegriCloud