summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] [test] Update for C++17 feature removals.Stephan T. Lavavej2017-08-2416-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test/std/containers/Emplaceable.h test/std/containers/NotConstructible.h test/support/counting_predicates.hpp Replace unary_function/binary_function inheritance with typedefs. test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp test/std/utilities/function.objects/func.require/binary_function.pass.cpp test/std/utilities/function.objects/func.require/unary_function.pass.cpp Mark these tests as requiring 98/03/11/14 because 17 removed unary_function/binary_function. test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp Mark these tests as requiring 11/14 because 17 removed packaged_task allocator support. test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp This test doesn't need to be skipped in C++17 mode. Only the construction of std::function from an allocator needs to be skipped in C++17 mode. test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp When testing these reference_wrapper features, unary_function inheritance is totally irrelevant. test/std/utilities/function.objects/refwrap/weak_result.pass.cpp Define and use my_unary_function/my_binary_function to test the weak result type machinery (which is still present in C++17, although deprecated). test/support/msvc_stdlib_force_include.hpp Now we can test C++17 strictly, without enabling removed features. Fixes D36503. llvm-svn: 311705
* [libcxx] [test] Rename _Up to U, etc. NFCI.Stephan T. Lavavej2017-08-115-18/+18
| | | | | | | | | | This improves readability and (theoretically) improves portability, as _Ugly names are reserved. This performs additional de-uglification, so all of these tests follow the example of iterator.traits/empty.pass.cpp. llvm-svn: 310761
* [libcxx] [test] Rename __x to x. NFCI.Stephan T. Lavavej2017-08-114-25/+26
| | | | | | | This improves readability and (theoretically) improves portability, as __ugly names are reserved. llvm-svn: 310760
* [libcxx] [test] Rename __c to ch. NFCI.Stephan T. Lavavej2017-08-1137-148/+148
| | | | | | | This improves readability and (theoretically) improves portability, as __ugly names are reserved. llvm-svn: 310759
* [libcxx] [test] Rename _Tp to T. NFCI.Stephan T. Lavavej2017-08-1124-80/+80
| | | | | | | This improves readability and (theoretically) improves portability, as _Ugly names are reserved. llvm-svn: 310758
* [libcxx] [test] Untabify stringstream.cons/string.pass.cpp. NFC.Stephan T. Lavavej2017-08-051-6/+6
| | | | llvm-svn: 310157
* [libcxx] [test] Fix URLs in comments and make them HTTPS. NFC.Stephan T. Lavavej2017-08-059-9/+9
| | | | llvm-svn: 310156
* [libcxx] [test] Consistently list "c++98, c++03" in chronological order. NFC.Stephan T. Lavavej2017-08-0516-16/+16
| | | | llvm-svn: 310155
* Fix shadowing warningMarshall Clow2017-08-021-1/+1
| | | | llvm-svn: 309851
* Fix PR33727: std::basic_stringbuf only works with DefaultConstructible ↵Marshall Clow2017-08-021-0/+19
| | | | | | allocators. Thanks to Jonathan Wakely for the report and suggested fix llvm-svn: 309838
* Mark LWG 2942 as completeEric Fiselier2017-07-302-4/+2
| | | | llvm-svn: 309528
* [libcxx] [test] Change comments to say C++ instead of c++. NFC.Stephan T. Lavavej2017-07-2934-36/+36
| | | | | | | | This makes them consistent (many comments already used uppercase). The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change. llvm-svn: 309468
* [libcxx] [test] The entire file futures.shared_future/wait_until.pass.cpp ↵Stephan T. Lavavej2017-07-291-130/+130
| | | | | | was indented by 1 space. NFC. llvm-svn: 309467
* [libcxx] [test] In func.wrap.func.con/alloc_F.pass.cpp, fix REQUIRES ↵Stephan T. Lavavej2017-07-291-1/+1
| | | | | | whitespace. NFC. llvm-svn: 309466
* [libcxx] [test] Make files consistently end with newlines, NFC.Stephan T. Lavavej2017-07-2916-16/+16
| | | | llvm-svn: 309465
* [libcxx] [test] Untabify, NFC.Stephan T. Lavavej2017-07-29121-810/+810
| | | | llvm-svn: 309464
* [libcxx] [test] Strip trailing whitespace, NFC.Stephan T. Lavavej2017-07-295-19/+17
| | | | llvm-svn: 309463
* [libcxx] [test] Remove an unused local typedef in ↵Stephan T. Lavavej2017-07-271-1/+0
| | | | | | | | enable_shared_from_this.pass.cpp. Trivial change, committed without review. llvm-svn: 309322
* Disable the deduction guide test I added in 309296 for the moment, while I ↵Marshall Clow2017-07-271-0/+4
| | | | | | figure out which compilers don't support deduction guides llvm-svn: 309307
* Implement P0739R0: 'Some improvements to class template argument deduction ↵Marshall Clow2017-07-272-4/+9
| | | | | | integration into the standard library' This is an API change (not ABI change) due to a late change in the c++17 standard llvm-svn: 309296
* Remove addtional parameters in function std::next() and std::prev()Rachel Craik2017-07-242-0/+6
| | | | | | | | | | | Creating a function pointer with proper parameters pointing to std::next() or std::prev() should work. This change moves the invented paramater for enable_if over to the return type to resolve this QoI issue. Patch by Jason Liu. Differential Revision: https://reviews.llvm.org/D34649 llvm-svn: 308932
* [libcxx] [test] Update msvc_stdlib_force_include.hpp.Stephan T. Lavavej2017-07-191-3/+4
| | | | | | | MSVC's STL is replacing _HAS_FUNCTION_ASSIGN with _HAS_FUNCTION_ALLOCATOR_SUPPORT, and is adding _HAS_UNEXPECTED. llvm-svn: 308535
* [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.Stephan T. Lavavej2017-07-1916-32/+0
| | | | | | Fix D34536. llvm-svn: 308534
* [libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following ↵Stephan T. Lavavej2017-07-191-2/+8
| | | | | | | | | | preprocessor directive - expected a newline". Also fixes Clang/LLVM 4.0 (for Windows) error "function-like macro 'TEST_GLIBC_PREREQ' is not defined". Fixes D34535. llvm-svn: 308533
* [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const ↵Stephan T. Lavavej2017-07-192-2/+2
| | | | | | | | char', possible loss of data". Fixes D34534. llvm-svn: 308532
* Add case for c++2a to libc++ and test macrosMarshall Clow2017-07-171-1/+4
| | | | llvm-svn: 308159
* Fix issues with UBSAN test configuration.Eric Fiselier2017-07-101-1/+1
| | | | | | | | On Apple the test feature 'sanitizer-new-delete' was incorrectly getting added to the LIT feature set, which mistakenly caused tests to be disabled when using UBSAN (the feature is only needed with ASAN/MSAN/TSAN). llvm-svn: 307518
* Work around PR31864 - ATOMIC_LLONG_LOCK_FREE is incorrect in 32 bit buildsEric Fiselier2017-07-101-2/+35
| | | | llvm-svn: 307517
* Fix test failure to to new/delete ellisionsEric Fiselier2017-07-091-2/+3
| | | | llvm-svn: 307510
* optional: Implement LWG 2900 and P0602Casey Carter2017-07-095-93/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D32385 llvm-svn: 307505
* Fix filesystem build on platforms with weird time_t types.Eric Fiselier2017-07-081-0/+200
| | | | | | | | | | | | | | 32-bit powerpc provides a 64 bit time_t type and older ppc64 systems provide time_t as a floating point type. This caused problems when building operations.cpp since operations.cpp contained compile time tests for conversions between time_t and filesystem time type. When these tests failed they caused the libc++ build to fail as well. This is unfortunate. This patch moves the tests out of the source file and into the test suite. It also expands the tests to allow testing of the weird time_t configurations on all platforms. llvm-svn: 307461
* Fix diagnostic in verify test to match new Clang outputEric Fiselier2017-07-071-1/+1
| | | | llvm-svn: 307450
* cmath: Support clang's -fdelayed-template-parsingDuncan P. N. Exon Smith2017-07-072-3/+31
| | | | | | | | | | | r283051 added some functions to cmath (in namespace std) that have the same name as functions in math.h (in the global namespace). Clang's limited support for `-fdelayed-template-parsing` chokes on this. Rename the ones in `cmath` and their uses in `complex` and the test. rdar://problem/32848355 llvm-svn: 307357
* Fix a bug in regex_Iterator where it would report zero-length matches ↵Marshall Clow2017-07-051-0/+18
| | | | | | forever. Reported as http://llvm.org/PR33681. Thanks to Karen Arutyunov for the report. llvm-svn: 307171
* Fix equivalent test on OS X and FreeBSDEric Fiselier2017-07-051-7/+7
| | | | llvm-svn: 307119
* Add dummy CMake target for *.pass.cpp tests when LIBCXX_CONFIGURE_IDE=ON.Eric Fiselier2017-07-051-0/+33
| | | | | | | | | | | | | | | | In order for IDE's like CLion to correctly parse and highlight the tests it needs to know roughly how to build them. This patch adds a dummy CMake target for each/all of the .pass.cpp tests in the test suite to solve this problem. The target is only created when LIBCXX_CONFIGURE_IDE=ON, so it shouldn't affect most users. Originally I wasn't sure that this change deserved to live upstream, but it's quite frustrating to edit libc++ tests using CLion or Visual Studio without it, in particular the filesystem tests which rely heavily on macros. Even though the change should have no effect on non-IDE users/configurations I decided to commit it upstream with the hopes it will benefit somebody other than me. llvm-svn: 307118
* Implement LWG 2937 - equivalent("dne", "exists") is not an errorEric Fiselier2017-07-051-51/+75
| | | | | | | | | | | | | | This patch speculatively implements the PR for LWG 2937, which fixes two issues with equivalent. (1) It makes equivalent("dne", "exists") an error. Previously only equivalent("dne", "dne") was an error and the former case was not (it returned false). Now equivalent reports an error when either input doesn't exist. (2) It makes equivalent(p1, p2) well-formed when `is_other(p1) && is_other(p2)`. Previously this was an error, but there is seemingly no reason why it should be on POSIX system. llvm-svn: 307117
* Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability"Akira Hatanaka2017-06-301-36/+0
| | | | | | | | | | | | | This reverts commit r306310. r306310 causes clang to reject a call to an aligned allocation or deallocation function if it is not implemented in the standard library of the deployment target. This is not the desired behavior when users have defined their own aligned functions. rdar://problem/32664169 llvm-svn: 306859
* Added failing tests for index out of range for tuple_element<pair<T1,T2>> ↵Marshall Clow2017-06-282-0/+54
| | | | | | and variant_alternative<> llvm-svn: 306580
* [libcxx] Annotate c++17 aligned new/delete operators with availabilityAkira Hatanaka2017-06-261-0/+36
| | | | | | | | | | | | | | | | | | | | | | | attribute. This is needed because older versions of libc++ do not have these operators. If users target an older deployment target and try to compile programs in which these operators are explicitly called, the compiler will complain. The following is the list of minimum deployment targets for the four OSes: macosx: 10.13 ios: 11.0 tvos: 11.0 watchos: 4.0 rdar://problem/32664169 Differential Revision: https://reviews.llvm.org/D34556 llvm-svn: 306310
* Implement inclusive_scan/transform_inclusive_scan for C++17.Marshall Clow2017-06-235-0/+635
| | | | llvm-svn: 306083
* Attempt to avoid static init ordering issues with globalMemCounterEric Fiselier2017-06-211-5/+10
| | | | llvm-svn: 305955
* [libcxx] [test] Fix -Wmismatched-tags in ↵Stephan T. Lavavej2017-06-201-2/+4
| | | | | | | | | | | | tuple_size_structured_bindings.pass.cpp. Clang and C1XX both complain about mismatched class/struct, but libc++ and MSVC's STL differ on what they use for tuple_element/tuple_size, so there's no way to win here. I'm reverting this part of my previous change. In the future, I'll have to suppress the warning for one compiler or the other. llvm-svn: 305854
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-06-2014-32/+31
| | | | llvm-svn: 305848
* [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp ↵Stephan T. Lavavej2017-06-201-6/+16
| | | | | | | | | | | | | | | | | | | and make it friendlier to C1XX. Style/paranoia: 42.1 doesn't have an exact binary representation. Although this doesn't cause failures, it makes me uncomfortable, so I'm changing it to 42.5. C1XX rightly warns about unreferenced variables. Adding tests for their values makes C1XX happy and improves test coverage. C1XX (somewhat obnoxiously) warns about seeing a struct specialized as a class. Although the Standard doesn't care, saying struct consistently is better. (The Standard itself is still inconsistent about whether to depict tuple_element and tuple_size as structs or classes.) Fixes D33953. llvm-svn: 305843
* Add a missing SFINAE condition to the `variant`'s converting constructor.Michael Park2017-06-191-0/+14
| | | | | | | | | | | | | | | | | | | | | Remarks: This function shall not participate in overload resolution unless `is_same_v<decay_t<T>, variant>` is false, unless `decay_t<T>` is neither a specialization of `in_place_type_t` nor a specialization of `in_place_index_t`, unless `is_constructible_v<Tj, T>` is true, and unless the expression `FUN(std::forward<T>(t))` (with `FUN` being the above-mentioned set of imaginary functions) is well formed. Depends on D34111. Reviewers: EricWF, K-ballo Reviewed By: EricWF Subscribers: fhahn Differential Revision: https://reviews.llvm.org/D34112 llvm-svn: 305668
* func.wrap.func.con: Fix test commentDuncan P. N. Exon Smith2017-06-181-1/+1
| | | | | | This tests moving `function`, not `const function`. llvm-svn: 305648
* any: Add availability for experimental::bad_any_castDuncan P. N. Exon Smith2017-06-189-48/+10
| | | | | | | | As a follow up to r302172, add missing availability for bad_any_cast. rdar://problem/32161524 llvm-svn: 305647
* Allow the libc++ C header wrappers to be included when compiling C.Eric Fiselier2017-06-161-0/+37
| | | | | | | | | | C99 at least. C89 still fails due to the use of block comments. NOTE: Having libc++ on the include path when compiling C is not recommended or ever really supported. However it happens often enough that this change is warrented. llvm-svn: 305539
* Allow coroutine_handle<const T> to support creation from const references to ↵Eric Fiselier2017-06-161-0/+35
| | | | | | | | | | | | | | | the promise_type It seems conceivable that a user would need to get a coroutine handle having only a const reference to the promise_type, for example from within a const member function of the promise. This patch allows that use case. A coroutine_handle<const T> can be used in essentially the same way a coroutine_handle<T>, ie to start and destroy the coroutine. The constness of the promise doesn't/shouldn't propagate to the handle. llvm-svn: 305536
OpenPOWER on IntegriCloud