summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant ↵Stephan T. Lavavej2017-05-051-2/+2
| | | | | | | | | | with another constant". The expressions `1 == 1` and `true` have the same type, value category, and value. Fixes D32924. llvm-svn: 302322
* [libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance ↵Stephan T. Lavavej2017-05-053-0/+54
| | | | | | | | | | | shouldn't be mandated". In C++17, these iterators are allowed but not required to inherit from the deprecated std::iterator base class. Fixes D32727. llvm-svn: 302318
* Mark test using <sys/time.h> as UNSUPPORTED on WindowsEric Fiselier2017-05-051-0/+3
| | | | llvm-svn: 302298
* Document XFAIL's with the relevent bug numberEric Fiselier2017-05-052-0/+4
| | | | llvm-svn: 302213
* Fix test failure with GCC 4.9Eric Fiselier2017-05-041-0/+4
| | | | llvm-svn: 302182
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-04158-80/+762
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* [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-045-4/+58
| | | | | | | * 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] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-05-0425-35/+35
| | | | llvm-svn: 302105
* [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
* cmath: Skip Libc for integral types in isinf, etc.Duncan P. N. Exon Smith2017-04-211-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | For std::isinf, the standard requires effectively calling isinf as double from Libc for integral types. But integral types are never infinite; we don't need to call Libc to return false. Also short-circuit other functions where Libc won't have interesting answers: signbit, fpclassify, isfinite, isnan, and isnormal. I added correctness tests for integral types since we're no longer deferring to Libc. In review it was pointed out that in future revisions of the C++ standard we may add more types to std::is_arithmetic (e.g., std::is_fixed_point). I'll leave it to a future commit to hack this to allow using math functions on those. We'll need to change things like __libcpp_fpclassify anyway, so I'm not sure anything here would really be future-proof. https://reviews.llvm.org/D31561 rdar://problem/31361223 llvm-svn: 301060
* Expand test coverage for LWG2857Casey Carter2017-04-213-17/+31
| | | | | | | | | | * Cover optional's emplace-from-initializer_list overload * Verify that any::emplace and optional::emplace return a reference to the correct type even for throwing cases. Differential Revision: https://reviews.llvm.org/D32106 llvm-svn: 301055
* update XFAIL comments with more detailsEric Fiselier2017-04-212-5/+3
| | | | llvm-svn: 300944
* Mark exception_ptr tests as XFAIL on Windows for nowEric Fiselier2017-04-2110-1/+31
| | | | llvm-svn: 300942
* XFAIL Windows test failures under test/libcxxEric Fiselier2017-04-2113-2/+52
| | | | | | | | This patch XFAIL's a number of tests under test/libcxx when on Windows. These failures need more investigation or patches to either Clang or libc++ but for now we don't want them to prevent the bot from going green. llvm-svn: 300941
* Resolve unused local typedef warning in test.Billy Robert O'Neal III2017-04-211-1/+0
| | | | llvm-svn: 300937
* Fix tests for extended noexcept in the container adaptors testsEric Fiselier2017-04-196-9/+12
| | | | llvm-svn: 300652
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in support headers and final testsEric Fiselier2017-04-1910-39/+35
| | | | llvm-svn: 300637
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the utilities libraryEric Fiselier2017-04-1929-35/+69
| | | | llvm-svn: 300635
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the string library.Eric Fiselier2017-04-199-243/+236
| | | | llvm-svn: 300633
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headersEric Fiselier2017-04-1930-34/+70
| | | | llvm-svn: 300632
* Cleanup _LIBCPP_HAS_NO_<c++11-features> macro usage in regexEric Fiselier2017-04-184-10/+8
| | | | llvm-svn: 300627
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the input.output libraryEric Fiselier2017-04-1821-54/+42
| | | | llvm-svn: 300626
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in algorithmEric Fiselier2017-04-1815-101/+63
| | | | llvm-svn: 300625
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros for std::initializer_listEric Fiselier2017-04-185-15/+27
| | | | llvm-svn: 300623
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in thread.Eric Fiselier2017-04-184-15/+13
| | | | llvm-svn: 300622
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> in std::unordered_map and ↵Eric Fiselier2017-04-1823-149/+51
| | | | | | | | std::unordered_multimap This completes the cleanup of the containers, at least within the tests. llvm-svn: 300620
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::unordered_set and ↵Eric Fiselier2017-04-1826-196/+58
| | | | | | std::unordered_multiset llvm-svn: 300619
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> for std::queue and std::priority_queue.Eric Fiselier2017-04-1820-58/+44
| | | | llvm-svn: 300604
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macro uses in std::stack.Eric Fiselier2017-04-1810-30/+22
| | | | llvm-svn: 300602
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::map and std::multimapEric Fiselier2017-04-1821-88/+42
| | | | llvm-svn: 300600
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> for std::set and std::multisetEric Fiselier2017-04-1824-88/+48
| | | | llvm-svn: 300595
* [test] Silence another unused-typedef warningCasey Carter2017-04-181-1/+0
| | | | llvm-svn: 300581
* [test] Silence unused parameter/typedef warningsCasey Carter2017-04-183-4/+2
| | | | llvm-svn: 300575
* Allow a standard library to implement conditional noexcept for optional and ↵Billy Robert O'Neal III2017-04-182-6/+14
| | | | | | | | | | unique_ptr hash functions. These tests were unconditionally asserting that optional and unique_ptr declare throwing hashes, but MSVC++ implements conditional noexcept forwarding that of the underlying hash function. As a result we were failing these tests but there's nothing forbidding strengthening noexcept in that way. Changed the ASSERT_NOT_NOEXCEPT asserts to use types which themselves have non-noexcept hash functions. llvm-svn: 300516
* Fix passing incorrectly value-category when constructing unique_ptr's deleterEric Fiselier2017-04-171-4/+99
| | | | llvm-svn: 300489
* [optional] Update synopsis for LWG2934Casey Carter2017-04-1712-18/+18
| | | | | | (comment-only change) llvm-svn: 300488
* Sigh. Once again forgot about the 'no exceptions' bots.Marshall Clow2017-04-172-0/+8
| | | | llvm-svn: 300451
* Mark LWG#2853 as complete. No code changes required, but added a couple of ↵Marshall Clow2017-04-172-0/+48
| | | | | | extra tests llvm-svn: 300449
* Cleanup one more <forward_list> testEric Fiselier2017-04-162-35/+5
| | | | llvm-svn: 300417
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <forward_list>Eric Fiselier2017-04-1611-45/+21
| | | | llvm-svn: 300415
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <list>Eric Fiselier2017-04-169-36/+18
| | | | llvm-svn: 300414
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in dequeEric Fiselier2017-04-1610-42/+20
| | | | llvm-svn: 300413
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <array>Eric Fiselier2017-04-161-1/+3
| | | | llvm-svn: 300412
* Workaround Clang bug regarding template template parametersEric Fiselier2017-04-161-5/+11
| | | | llvm-svn: 300411
* Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in vector.Eric Fiselier2017-04-1619-81/+43
| | | | | | | | | | | | | This patch cleans up all usages of the following feature test macros inside <vector> and its tests: * _LIBCPP_HAS_NO_RVALUE_REFERENCES * _LIBCPP_HAS_NO_VARIADICS * _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS Where needed the above guards were replaced with _LIBCPP_CXX03_LANG. llvm-svn: 300410
* Overhaul unique_ptr - Implement LWG 2801, 2905, 2520.Eric Fiselier2017-04-1617-75/+750
| | | | | | | | | | | | | | | | | | | | | 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
* Implement LWG 2857 for variant. Tests from Casey Carter @ Microsoft.Eric Fiselier2017-04-154-30/+83
| | | | | | | Also mark LWG 2857 as complete, since the changes to optional and any were completed by Marshall earlier. llvm-svn: 300403
* Simplify test helperEric Fiselier2017-04-151-7/+1
| | | | llvm-svn: 300399
* Fix PR32642 - string::insert and string::append don't work with move_iterator.Eric Fiselier2017-04-152-4/+45
| | | | llvm-svn: 300397
OpenPOWER on IntegriCloud