summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR#35967: '<regex> syntax_option_type is not a proper bitmask' Sadly, ↵Marshall Clow2019-03-282-1/+5
| | | | | | this is an ABI break, so it's only available if you define either '_LIBCPP_ABI_VERSION > 2' or '_LIBCPP_ABI_UNSTABLE' or '_LIBCPP_ABI_REGEX_CONSTANTS_NONZERO' and rebuild your dylib. llvm-svn: 357190
* [libc++] Remove unnecessary <iostream> #includes in testsLouis Dionne2019-03-2824-45/+4
| | | | | | | Some tests #include <iostream> but they don't use anything from the header. Those are probably artifacts of when the tests were developped. llvm-svn: 357181
* Reworked all the utilities/meta tests to use ASSERT_SAME_TYPE instead of ↵Marshall Clow2019-03-2827-153/+120
| | | | | | 'static_assert( is_same<'. Much easier to read. I left two tests alone: is_same.pass.cpp, which should call 'is_same' directly, and common_type.pass.cpp, which Eric is working on. NFC intended llvm-svn: 357146
* [libc++] Rename span's as_writeable_bytes to as_writable_bytesLouis Dionne2019-03-283-52/+52
| | | | | | | | | | | | Summary: The Standard says as_writable_bytes. Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59882 llvm-svn: 357139
* Fix occurrences of _LIBCPP_ASSERT in span testsCasey Carter2019-03-273-8/+8
| | | | llvm-svn: 357092
* [libc++] Add proper XFAILs for shared_mutex testsLouis Dionne2019-03-2714-2/+13
| | | | | | | | | | Dylib support for shared_mutex was added in macOS 10.12, so the tests should be XFAILed accordingly instead of being completely disabled whenever availability is enabled. rdar://problem/48769104 llvm-svn: 357079
* Revert "[coroutines] Add std::experimental::task<T> type"Brian Gesiak2019-03-2610-1172/+0
| | | | | | | | This revision is causing build and test failures, such as http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-armv8-linux/builds/648/steps/test.libcxx/logs/stdio, so I'll revert it. llvm-svn: 357023
* [coroutines] Add std::experimental::task<T> typeBrian Gesiak2019-03-2610-0/+1172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds the coroutine `std::experimental::task<T>` type described in proposal P1056R0. See https://wg21.link/P1056R0. This implementation allows customization of the allocator used to allocate the coroutine frame by passing std::allocator_arg as the first argument, followed by the allocator to use. This supports co_awaiting the same task multiple times. The second and subsequent times it returns a reference to the already-computed value. This diff also adds some implementations of other utilities that have potential for standardization as helpers within the test/... area: - `sync_wait(awaitable)` - See P1171R0 - `manual_reset_event` Move the definition of the __aligned_allocation_size helper function from <experimental/memory_resource> to <experimental/__memory> so it can be more widely used without pulling in memory_resource. Outstanding work: - Use C++14 keywords directly rather than macro versions eg. use `noexcept` instead of `_NOEXCEPT`). - Add support for overaligned coroutine frames. This may need wording in the Coroutines TS to support passing the extra `std::align_val_t`. - Eliminate use of `if constexpr` if we want it to compile under C++14. Patch by @lewissbaker (Lewis Baker). llvm-svn: 357010
* Cleaup of requirements for optional. While researching LWG3196, I realized ↵Marshall Clow2019-03-251-0/+47
| | | | | | that optional did not reject 'const in_place_t' like it should. Added a test as well, and a check for arrays (which were already disallowed, but now we get a better error message). Should not affect anyone's code. llvm-svn: 356918
* Fix a minor bug with std::next and prev not and negative numbers. In ↵Marshall Clow2019-03-222-13/+23
| | | | | | particular, std::prev cannot require Bidirectional Iterators, because you might 'go back' -1 places, which goes forward. Thanks to Ville and Jonathan for the bug report. llvm-svn: 356818
* Fix a vector test to not use a local type as a template parameter. This ↵Marshall Clow2019-03-221-7/+9
| | | | | | causes a warning on C++03. NFC llvm-svn: 356726
* [libc++] Remove too-stringent XFAILs for file_clock testsLouis Dionne2019-03-213-4/+0
| | | | | | | Those tests actually pass because we don't use anything that's marked as unavailable. llvm-svn: 356719
* [libc++] Mark bad_any_cast tests as unsupported when the dylib doesn't ↵Louis Dionne2019-03-213-12/+3
| | | | | | | | | support bad_any_cast With the latest compiler fix to availability, some availability failures that didn't trigger before now trigger. llvm-svn: 356678
* [libcxx] [test] Revert r356632 add (void) casts to operator new calls, to ↵Billy Robert O'Neal III2019-03-216-6/+6
| | | | | | suppress warnings generated by [[nodiscard]]." llvm-svn: 356635
* Allow disabling of filesystem library.Eric Fiselier2019-03-211-0/+3
| | | | | | | | | | | | | | Summary: Filesystem doesn't work on Windows, so we need a mechanism to turn it off for the time being. Reviewers: ldionne, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: mstorsjo, mgorny, christof, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59619 llvm-svn: 356633
* [libcxx] [test] Add (void) casts to operator new calls, to suppress warnings ↵Billy Robert O'Neal III2019-03-206-6/+6
| | | | | | | | generated by [[nodiscard]]. This allows these tests to pass when compiled by MSVC++. llvm-svn: 356632
* [libc++] Mark <filesystem> as unavailable on Apple platforms using pragmasLouis Dionne2019-03-203-0/+4
| | | | | | | | | | | | | | | | | | | | | Summary: Also add the corresponding XFAILs to tests that require filesystem. The approach taken to mark <filesystem> as unavailable in this patch is to mark all the header as unavailable using #pragma clang attribute. Marking each declaration using the attribute is more intrusive and does not provide a lot of value right now because pretty much everything in <filesystem> requires dylib support, often transitively. This is an alternative to https://reviews.llvm.org/D59093. A similar (but partial) patch was already applied in r356558. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59224 llvm-svn: 356616
* Mark <charconv> tests as unsupported for C++11 and C++14 if you're not ↵Marshall Clow2019-03-204-0/+8
| | | | | | testing libc++. Thanks to Louis for the suggestion. llvm-svn: 356602
* Make to_chars/from_chars work back to C++11. This means that we can use them ↵Marshall Clow2019-03-204-4/+4
| | | | | | to implement to_string as well. Reviewed as https://reviews.llvm.org/D59598. llvm-svn: 356585
* [libc++] Mark <filesystem> tests as failing when the dylib doesn't support ↵Louis Dionne2019-03-209-0/+11
| | | | | | | | | | | | filesystem This fixes CI for back-deployment testers on platforms that don't have <filesystem> support in the dylib. This is effectively half of https://reviews.llvm.org/D59224. The other half requires fixes in Clang. llvm-svn: 356558
* [libc++] Flag file_clock test as expected to fail with ASANLouis Dionne2019-03-191-0/+4
| | | | | | | This silences a known issue, as can be seen by looking at similar tests for other clocks, like time.clock.steady/consistency.pass.cpp. llvm-svn: 356528
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-194-12/+0
| | | | | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Unlike the previous attempt (r356500), this doesn't remove all the filesystem tests. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356518
* Revert "[libc++] Build <filesystem> support as part of the dylib"Louis Dionne2019-03-19150-0/+14182
| | | | | | | | When I applied r356500 (https://reviews.llvm.org/D59152), I somehow deleted all of filesystem's tests. I will revert r356500 and re-apply it properly. llvm-svn: 356505
* Fix char.traits.specializations.char8_t main returnJF Bastien2019-03-194-0/+4
| | | | llvm-svn: 356504
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-19150-14182/+0
| | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356500
* Mark 'front()' and 'back()' as noexcept for array/deque/string/string_view. ↵Marshall Clow2019-03-198-19/+68
| | | | | | These are just rebranded 'operator[]', and should be noexcept like it is. llvm-svn: 356435
* Update a deque test with more assertions. NFCMarshall Clow2019-03-151-6/+6
| | | | llvm-svn: 356266
* Mark vector::operator[] and front/back as noexcept. We already do this for ↵Marshall Clow2019-03-151-0/+121
| | | | | | string and string_view. This should give better codegen inside of noexcept functions. Add tests for op[]/front/back/at, because apparently we had none. llvm-svn: 356224
* Add noexcept to operator[] for array and deque. This is an extension. We ↵Marshall Clow2019-03-142-4/+29
| | | | | | already do this for string and string_view. This should give better codegen inside of noexcept functions. llvm-svn: 356209
* Reorg the midpoint pointer test into runtime and constexpr tests; comment ↵Marshall Clow2019-03-141-10/+40
| | | | | | out the volatile constexpr tests for GCC because our experimental gcc bot barfs on them. llvm-svn: 356177
* Fix two of the three bot failures for midpoint; the ones regarding the lack ↵Marshall Clow2019-03-141-1/+4
| | | | | | of '__int128_t' llvm-svn: 356169
* Add std::midpoint for integral and poiner types. Described in P0811, ↵Marshall Clow2019-03-143-0/+224
| | | | | | reviewed as D59099. llvm-svn: 356162
* Properly constrain basic_string(Iter, Iter, Alloc = A())Eric Fiselier2019-03-141-0/+9
| | | | llvm-svn: 356140
* [libc++] Enable deprecation warnings by defaultLouis Dionne2019-03-1279-24/+145
| | | | | | | | | | | | | | | | | | | Summary: In r342843, I added deprecation warnings to some facilities that were deprectated in C++14 and C++17. However, those deprecation warnings were not enabled by default. After discussing this on IRC, we had finally gotten consensus to enable those warnings by default, and I'm getting around to doing that only now. Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D58140 llvm-svn: 355961
* Allow optional to tolerate being used with a nested class.Eric Fiselier2019-03-111-0/+41
| | | | | | | | | | | | | | | When Clang tries to complete a type containing `std::optional` it considers the `in_place_t` constructor with no arguments which checks if the value type is default constructible. If the value type is a nested class type, then this check occurs too early and poisons the is_default_constructible trait. This patch makes optional deduce `in_place_t` so we can prevent this early SFINAE evaluation. Technically this could break people doing weird things with the in_place_t tag, but that seems less important than making the nested class case work. llvm-svn: 355877
* Eradicate all the ptrdiff_ts in span left over from applying P1227. A couple ↵Marshall Clow2019-03-0611-26/+26
| | | | | | of other minor cleanups. NFC llvm-svn: 355481
* Reinstate libc++ patches now that the lldb formatter has been updated.Davide Italiano2019-03-053-25/+49
| | | | | | | | "[libc++] Fix <atomic> failures on GCC" "[libc++] Change memory_order to an enum class" "[libc++] decoupling Freestanding atomic<T> from libatomic.a" llvm-svn: 355427
* [libcxx] Revert set of atomic patches that broke lldb.Davide Italiano2019-03-053-49/+25
| | | | | | | | | | | Revert "[libc++] Fix <atomic> failures on GCC" Revert "[libc++] Change memory_order to an enum class" Revert "[libc++] decoupling Freestanding atomic<T> from libatomic.a" The lldb formatter nededs to be updated. Shafik and Louis will coordinate to do so. llvm-svn: 355417
* [libc++] Fix <atomic> failures on GCCLouis Dionne2019-03-051-17/+17
| | | | | | | | | | | | | | | | Summary: In https://reviews.llvm.org/D58201, we turned memory_order into an enum class in C++20 mode. However, we were not casting memory_order to its underlying type correctly for the GCC implementation, which broke the build bots. I also fixed a test that was failing in C++17 mode on GCC 5. Reviewers: EricWF, jfb, mclow.lists Subscribers: zoecarver Differential Revision: https://reviews.llvm.org/D58966 llvm-svn: 355409
* [libc++] Change memory_order to an enum classLouis Dionne2019-03-052-8/+32
| | | | | | | | | This implements P0439R0. Thanks to Zoe Carver for the patch. Differential Revision: https://reviews.llvm.org/D58201 llvm-svn: 355403
* [libc++] Fix forgotten fclose() in unit testLouis Dionne2019-03-011-0/+1
| | | | | | | Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D58732 llvm-svn: 355162
* [libc++] Increase portability of xalloc testLouis Dionne2019-03-011-5/+3
| | | | | | | | | | Do not assume that xalloc() starts at 0, which is not specified by the Standard. Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D58299 llvm-svn: 355160
* [libc++] Add is_nothrow_convertible from P0758R1Louis Dionne2019-02-271-0/+58
| | | | | | | Reviewed as https://reviews.llvm.org/D58019. Thanks to Zoe Carver for the patch. llvm-svn: 355010
* Implment the last part of P1024: tuple-like interface to span. Reviewed as ↵Marshall Clow2019-02-276-0/+248
| | | | | | https://reviews.llvm.org/D58706. llvm-svn: 354988
* Implement the second part of P1227R2 - Signed ssize() functions. Reviewed as ↵Marshall Clow2019-02-272-10/+128
| | | | | | https://reviews.llvm.org/D58642 llvm-svn: 354950
* Fix an ambiguity in the tests that gcc-tot complained about.Marshall Clow2019-02-2711-22/+22
| | | | llvm-svn: 354944
* [libc++] Add a test for PR14074Louis Dionne2019-02-271-0/+62
| | | | | | PR14074 was fixed in r165884, but no tests were added. llvm-svn: 354943
* [libc++] Mark several tests as XFAIL on macosx10.7Louis Dionne2019-02-2736-0/+179
| | | | | | | | | | | | | | | Those tests fail when linking against a new dylib but running against macosx10.7. I believe this is caused by a duplicate definition of the RTTI for exception classes in libc++.dylib and libc++abi.dylib, but this matter still needs some investigation. This issue was not caught previously because all the tests always linked against the same dylib used for running (because LIT made it impossible to do otherwise before r349171). rdar://problem/46809586 llvm-svn: 354940
* First part of P1227R2 - change span over to use 'size_t' instead of ↵Marshall Clow2019-02-275-18/+18
| | | | | | 'ptrdiff_t'. Reviewed as https://reviews.llvm.org/D58639. llvm-svn: 354936
* Implement P1357: Traits for [Un]bounded Arrays; adopted in KonaMarshall Clow2019-02-262-0/+142
| | | | llvm-svn: 354891
OpenPOWER on IntegriCloud