summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] [test] Untabify, NFC.Stephan T. Lavavej2017-07-291-3/+3
| | | | llvm-svn: 309464
* [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
* Add case for c++2a to libc++ and test macrosMarshall Clow2017-07-171-1/+4
| | | | llvm-svn: 308159
* Attempt to avoid static init ordering issues with globalMemCounterEric Fiselier2017-06-211-5/+10
| | | | llvm-svn: 305955
* any: Add availability for experimental::bad_any_castDuncan P. N. Exon Smith2017-06-181-0/+2
| | | | | | | | As a follow up to r302172, add missing availability for bad_any_cast. rdar://problem/32161524 llvm-svn: 305647
* Add some const_casts in places where we were implicitly casting away ↵Marshall Clow2017-06-141-1/+1
| | | | | | constness. No functional change, but now they're explicit llvm-svn: 305410
* Fix bug 33389 - __is_transparent check requires too muchMarshall Clow2017-06-131-3/+13
| | | | llvm-svn: 305292
* [libcxx] [test] Update locale names for Windows.Stephan T. Lavavej2017-06-082-11/+9
| | | | | | | | | | | | | | | | | locale.codecvt.byname/ctor_char.pass.cpp: This test used to use "en_US" as a plain string instead of using platform_support. Need to fix this because MS STL expects "en-US" instead. platform_support.h: These are the legacy Windows locale names. Should use IETF tags instead. I've also added en_US, since a test was using that as a locale string as well. msvc_stdlib_force_include.hpp: Remove _MSVC_STL_VER. The libraries will directly define _MSVC_STL_VERSION in the future. Fixes D29351. llvm-svn: 305000
* [test] Test changes to accommodate LWG 2904 "Make variant move-assignment ↵Casey Carter2017-06-071-2/+2
| | | | | | | | | | more exception safe" Also: Move constexpr / triviality extension tests into the std tree and make them conditional on _LIBCPP_VERSION / _MSVC_STL_VERSION. https://reviews.llvm.org/D32671 llvm-svn: 304847
* [libcxx] [test] Add _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to ↵Stephan T. Lavavej2017-06-061-0/+3
| | | | | | | | | msvc_stdlib_force_include.hpp. This macro will instruct MSVC's STL to not warn about features that are deprecated in C++17, as libcxx tests those features and uses them elsewhere. llvm-svn: 304765
* [test] Remove workaround for C1XX empty parameter pack bugCasey Carter2017-06-053-57/+0
| | | | | | Was VSO#109062. This bug was filed *4 years ago*. I submitted a workaround to enable the scoped_allocator_adaptor tests to pass. Bug fixed a week and a half later. This was either a waste of my time, or I've discovered that libc++ has magical bugfix-inducing powers. My money's on the latter. llvm-svn: 304730
* Guard against more macros in tchar.hEric Fiselier2017-05-311-1/+7
| | | | llvm-svn: 304352
* Remove uses of _UI because Windows is evil and tchar.h #define's itEric Fiselier2017-05-311-0/+2
| | | | llvm-svn: 304348
* [test] s/uexpectedly/unexpectedly/Casey Carter2017-05-301-1/+1
| | | | llvm-svn: 304236
* [coroutines] Add end-to-end tests within libc++Eric Fiselier2017-05-281-0/+75
| | | | | | | | | | | | | This patch adds end-to-end/breathing tests for coroutines into libc++. The tests aren't specifically to test libc++ requirements but instead are intented to ensure coroutines are working fine in general. Although libc++ isn't exactly the most correct place for these tests to live, there is one major advantage. The libc++ test suite is also used by MSVC and by adding the tests here it ensures they will be run against all currently available coroutine implementations. llvm-svn: 304101
* [test] Remove workaround for C1XX conversion-to-nullptr bugCasey Carter2017-05-253-36/+4
| | | | | | | | | | VSO#391542 "Types can't be convertible to nullptr_t" Also put internal bug numbers on the workarounds in test_workarounds.h for correlation. Differential Revision: https://reviews.llvm.org/D33290 llvm-svn: 303889
* [test] Workaround C1XX bug in uses_allocator_types.hppCasey Carter2017-05-253-0/+58
| | | | | | | | VSO#109062 "Explicit template argument specification with empty template parameter pack expansion does not imply further empty pack expansion" Differential Revision: https://reviews.llvm.org/D33214 llvm-svn: 303888
* Add <experimental/coroutine>Eric Fiselier2017-05-251-0/+6
| | | | | | | This patch adds the library portions of the coroutines PDTS, which should now be supported by Clang. llvm-svn: 303836
* Make next/prev/advance/distance operations on iterators be constexpr. I ↵Marshall Clow2017-05-171-64/+64
| | | | | | missed this when I implemented the rest of P0031R0 llvm-svn: 303281
* Fix bad #endif in msvc_stdlib_force_include.hpp.Billy Robert O'Neal III2017-05-101-6/+7
| | | | llvm-svn: 302728
* [test] support machinery changes for EDG & C1XX /ZaCasey Carter2017-05-106-9/+77
| | | | | | | | | | | | | | | | | | | | | This change works around a couple of bugs: 1. EDG doesn't like explicit constexpr in a derived class. This program: struct Base {}; struct Derived : Base { constexpr Derived() = default; }; triggers "error: defaulted default constructor cannot be constexpr." 2. C1XX with /Za has no idea which constructor needs to be valid for copy elision. The change also conditionally disables parts of the msvc_stdlib_force_include.hpp header that conflict with external configuration when _LIBCXX_IN_DEVCRT is defined. Differential Revision: https://reviews.llvm.org/D32778 llvm-svn: 302707
* Fix misspelling of environment throughout libc++Eric Fiselier2017-05-092-3/+3
| | | | llvm-svn: 302600
* [libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more ↵Stephan T. Lavavej2017-05-051-1/+0
| | | | | | | | fine-grained manner. Fixes D32926. llvm-svn: 302325
* Fix test failure with GCC 4.9Eric Fiselier2017-05-041-0/+4
| | | | llvm-svn: 302182
* [test] Name the local variable in the C1XX implementation of DoNotOptmizeCasey Carter2017-05-041-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D32510 llvm-svn: 302162
* [test] variant: enable constexpr construction tests on MSVC STLCasey Carter2017-05-043-0/+37
| | | | | | | * Add a new macro _MSVC_STL_VER to detect when the MSVC STL is being tested * Workaround C1XX __is_trivially_copyable bug llvm-svn: 302158
* [libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set ↵Stephan T. Lavavej2017-05-041-2/+8
| | | | | | | | | | | | | | | | | | | | | | | TEST_STD_VER. _HAS_CXX17 indicates whether MSVC's STL is in C++17 mode. In MSVC there's a distinction between CRT headers like stdlib.h and STL headers like cstdlib. Only the STL headers drag in yvals.h, our internal STL-wide header that defines internal macros like _HAS_CXX17. _HAS_CXX17 is an MSVC STL library macro, unconditionally defined. We centralize everything on this, because we have to ask different questions to determine whether C1XX, EDG, or Clang is in 14 or 17 mode, and we additionally permit users to override the detection in one way (it's okay to ask for 17 from the compiler, but only 14 from the libs, at least for the moment; only noexcept in the type system will give us a headache). As this header is for testing MSVC's STL, we can assume _HAS_CXX17 is defined. Fixes D32726. llvm-svn: 302104
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in support headers and final testsEric Fiselier2017-04-195-28/+24
| | | | llvm-svn: 300637
* Overhaul unique_ptr - Implement LWG 2801, 2905, 2520.Eric Fiselier2017-04-162-8/+4
| | | | | | | | | | | | | | | | | | | | | This patch overhauls both specializations of unique_ptr while implementing the following LWG issues: * LWG 2801 - This issue constrains unique_ptr's constructors when the deleter type is not default constructible. Additionally it adds SFINAE conditions to unique_ptr<T[]>::unique_ptr(Up). * LWG 2905 - This issue reworks the unique_ptr(pointer, /* see below */ deleter) constructors so that they correctly SFINAE when the deleter argument cannot be used to construct the stored deleter. * LWG 2520 - This issue fixes initializing unique_ptr<T[]> from nullptr. Libc++ had previously implemented this issue, but the suggested resolution still broke initialization from NULL. This patch re-works the unique_ptr<T[]>(Up, deleter) overloads so that they accept NULL as well as nullptr. llvm-svn: 300406
* Simplify test helperEric Fiselier2017-04-151-7/+1
| | | | llvm-svn: 300399
* Rewrite and cleanup unique_ptr tests.Eric Fiselier2017-04-152-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch almost entirely rewrites the unique_ptr tests. There are a couple of reasons for this: A) Most of the *.fail.cpp tests were either incorrect or could be better written as a *.pass.cpp test that uses <type_traits> to check if certain operations are valid (Ex. Using static_assert(!std::is_copy_constructible_v<T>) instead of writing a failure test). B) [unique.ptr.runtime] has very poor test coverage. Many of the constructors and assignment operators have to tests at all. The special members that have tests have very few test cases and are typically way out of date. C) The tests for [unique.ptr.single] and [unique.ptr.runtime] are largely duplicates of each other. This means common requirements have two different sets of tests in two different test files. This makes the tests harder to maintain than if there was a single copy. To address (A) this patch changes almost all of the *.fail.cpp tests into .pass.cpp tests using type traits; Allowing the *.fail.cpp tests to be removed. The address (B) and (C) the tests for [unique.ptr.single] and [unique.ptr.runtime] have been combined into a single directory, allowing both specializations to share common tests. Tests specific to the single/runtime specializations are given the suffix "*.single.pass.cpp" or "*.runtime.pass.cpp". Finally the unique.ptr test have been moved into the correct directory according to the standard. Specifically they have been removed from "utilities/memory" into "utilities/smartptr". PS. This patch also adds newly written tests for upcoming unique_ptr changes/fixes. However since these tests don't currently pass they are guarded by the macro TEST_WORKAROUND_UPCOMING_UNIQUE_PTR_CHANGES. This allows other STL's to validate the tests before libc++ implements the changes. The relevant libc++ changes should land in the next week. llvm-svn: 300388
* Add TEST_NOEXCEPT_FALSE to support D31738Eric Fiselier2017-04-131-0/+2
| | | | llvm-svn: 300191
* Fix incorrectly qualified return type from unique_ptr::get_deleter().Eric Fiselier2017-04-121-1/+1
| | | | | | | | | | | For reference deleter types the const qualifier on the return type of get_deleter() should be ignored, and a non-const deleter should be returned. This patch fixes a bug where "const deleter_type&" is incorrectly formed. llvm-svn: 300121
* Can't test for noexcept on C++03; std::hash<nullptr_t> isn't available until ↵Marshall Clow2017-03-231-0/+5
| | | | | | C++17 llvm-svn: 298580
* Address post-commit review comments regarding test_workarounds.hEric Fiselier2017-03-232-3/+3
| | | | llvm-svn: 298566
* [libc++] Work around C1XX bug which breaks poisoned hash tests.Eric Fiselier2017-03-224-0/+63
| | | | | | | | | | | | | | Summary: This is my attempt to work around the C1XX bug described to me by @BillyONeal. Reviewers: BillyONeal, STL_MSFT, CaseyCarter Reviewed By: BillyONeal Subscribers: cfe-commits, BillyONeal Differential Revision: https://reviews.llvm.org/D31260 llvm-svn: 298554
* Fix DoNotOptimize on MSVCEric Fiselier2017-03-111-2/+4
| | | | llvm-svn: 297532
* [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible ↵Eric Fiselier2017-02-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameter types. Summary: This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug: The standard says: template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>> class basic_string { using value_type = typename traits::char_type; // ... basic_string(const charT* s, const Allocator& a = Allocator()); }; libc++ actually chooses to declare the constructor as basic_string(const value_type* s, const Allocator& a = Allocator()); The implicit deduction guides from class template argument deduction make what was previously an implementation detail visible: std::basic_string s = "foo"; // error, can't deduce charT. The constructor in question is in the libc++ DSO, but fortunately it looks like fixing this will not result in an ABI break. @rsmith How does this look? I did more than just the constructors mentioned in the PR, but IDK how far to take it. Reviewers: mclow.lists, rsmith Reviewed By: rsmith Subscribers: cfe-commits, rsmith Differential Revision: https://reviews.llvm.org/D29863 llvm-svn: 295393
* Prevent UBSAN from generating unsigned overflow diagnostics in the hashing ↵Eric Fiselier2017-02-081-0/+12
| | | | | | internals llvm-svn: 294391
* fix python3 syntax errorEric Fiselier2017-02-071-1/+1
| | | | llvm-svn: 294355
* [libcxx] [test] Fix Clang -Wdeprecated-declarations with MSVC's CRT.Stephan T. Lavavej2017-02-051-20/+20
| | | | | | | | | | | | | | | | libcxx's tests use various C Standard Library functions that have been marked by MSVC's CRT as deprecated by Microsoft (not by ISO). libcxx's usage is cromulent (just checking with decltype to see if the functions are being dragged in by various headers as required by the Standard), so defining _CRT_SECURE_NO_WARNINGS will silence the warnings in a targeted manner. This needs to be defined before including any CRT headers. Also, make this file prettier. Fixes D29138. llvm-svn: 294157
* Fix recent build errorsEric Fiselier2017-01-211-1/+1
| | | | llvm-svn: 292689
* Implement P0513R0 - "Poisoning the Hash"Eric Fiselier2017-01-214-28/+362
| | | | | | | | | | | | | | | | | | | | | Summary: Exactly what the title says. This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it. See http://wg21.link/P0513R0 for more info. If there are no comments in the next couple of days I'll commit this Reviewers: mclow.lists, K-ballo, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28938 llvm-svn: 292684
* Refactor unique_ptr/shared_ptr deleter test types into single header.Eric Fiselier2017-01-202-1/+382
| | | | llvm-svn: 292577
* Fix demangle helper after r286788Eric Fiselier2017-01-202-4/+2
| | | | llvm-svn: 292541
* Adjust msvc_stdlib_force_include.hpp to handle clang++Eric Fiselier2017-01-191-79/+78
| | | | | | | | | | | | Summary: This patch adjusts the newly added `msvc_stdlib_force_include.hpp` so that it also works when used with `clang++`. Reviewers: STL_MSFT Reviewed By: STL_MSFT Differential Revision: https://reviews.llvm.org/D28917 llvm-svn: 292539
* [libcxx] [test] Add msvc_stdlib_force_include.hpp.Stephan T. Lavavej2017-01-181-0/+79
| | | | | | | | | No functional change; nothing includes this, instead our test harness injects it via the /FI compiler option. No code review; blessed in advance by EricWF. llvm-svn: 292443
* [libcxx] [test] Fix comment typos, strip trailing whitespace.Stephan T. Lavavej2017-01-186-7/+7
| | | | | | No functional change, no code review. llvm-svn: 292434
* Get more std::string _LIBCPP_DEBUG tests passingEric Fiselier2017-01-181-3/+7
| | | | llvm-svn: 292342
* Add support for running our test suite against MSVC's STLEric Fiselier2017-01-181-1/+2
| | | | llvm-svn: 292326
OpenPOWER on IntegriCloud