summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
Commit message (Collapse)AuthorAgeFilesLines
* Flatten the tuple_element and __make_tuple_types implementations.Eric Fiselier2016-07-011-0/+34
| | | | | | | | | | This patch attempts to improve the QoI of std::tuples tuple_element and __make_tuple_types helpers. Previously they required O(N) instantiations, one for every element in the tuple The new implementations are O(1) after __tuple_indices<Id...> is created. llvm-svn: 274330
* Fix use of terse static assert. Patch from STL@microsoft.comEric Fiselier2016-06-301-1/+1
| | | | llvm-svn: 274206
* Implement P0163r0. Add shared_ptr::weak_type.Eric Fiselier2016-06-271-0/+6
| | | | | | | | | | This patch adds the weak_type typedef in shared_ptr. It is available in C++17 and newer. This patch also updates the _LIBCPP_STD_VER and TEST_STD_VER macros to have the value of 16, since 2016 is the current year. llvm-svn: 273839
* Implement P0358r1. Fixes for not_fn.Eric Fiselier2016-06-271-28/+69
| | | | llvm-svn: 273837
* Fix C++03 failure in enable_shared_from_this testEric Fiselier2016-06-271-1/+2
| | | | llvm-svn: 273836
* Fix PR27115 - enable_shared_from_this does not work as a virtual base class.Eric Fiselier2016-06-261-0/+16
| | | | | | | | | | | | | See https://llvm.org/bugs/show_bug.cgi?id=27115 The problem was that the conversion from 'const enable_shared_from_this<T>*' to 'const T*' didn't work if T inherited enable_shared_from_this as a virtual base class. The fix is to take the original pointer passed to shared_ptr's constructor in the __enable_weak_this method and perform an upcast to 'const T*' instead of performing a downcast from the enable_shared_from_this base. llvm-svn: 273835
* Implement LWG 2488 - Make the placeholders constexpr.Eric Fiselier2016-06-261-0/+28
| | | | | | | | | | | | | | | | | | | This patch makes the bind placeholders in std::placeholders both (1) const and (2) constexpr (See below). This is technically a breaking change for any code using the placeholders outside of std::bind and depending on them being non-const. However I don't think this will break any real world code. (1) Previously the placeholders were non-const extern globals in all dialects. This patch changes these extern globals to be const in all dialects. Since the cv-qualifiers don't participate in name mangling for globals this is an ABI compatible change. (2) Make the placeholders constexpr in C++11 and beyond. Although LWG 2488 only applies to C++17 I don't see any reason not to backport this change. llvm-svn: 273824
* Make shared_ptr constructor tests use count_new.hppEric Fiselier2016-06-225-151/+92
| | | | llvm-svn: 273379
* Don't use non-conforming pointer_traits specialization it tests.Eric Fiselier2016-06-221-1/+3
| | | | llvm-svn: 273368
* Move remaining _LIBCPP_VERSION tests into test/libcxxEric Fiselier2016-06-229-180/+0
| | | | llvm-svn: 273367
* Move typoed dir meta.hel to meta.helpEric Fiselier2016-06-222-0/+0
| | | | llvm-svn: 273362
* Fix comment typos, strip trailing whitespace. Patch from STL@microsoft.comEric Fiselier2016-06-224-5/+5
| | | | llvm-svn: 273357
* Avoid huge main() functions and huge arrays. Patch from STL@microsoft.comEric Fiselier2016-06-221-3/+3
| | | | llvm-svn: 273354
* Don't use C++17 terse static assert. Patch from STL@microsoft.comEric Fiselier2016-06-228-120/+120
| | | | llvm-svn: 273353
* Suppress unused warnings in std::invoke tests.Eric Fiselier2016-06-221-4/+4
| | | | llvm-svn: 273348
* Guard libc++ assumption about identity hashing in test. Patch from ↵Eric Fiselier2016-06-221-3/+7
| | | | | | STL@microsoft.com llvm-svn: 273345
* Fix PR27684 - std::tuple no longer accepts reference to incomplete type in ↵Eric Fiselier2016-06-212-20/+56
| | | | | | | | | | | | | | | | | some cases. Libc++ has to deduce the 'allocator_arg_t' parameter as 'AllocArgT' for the following constructor: template <class Alloc> tuple(allocator_arg_t, Alloc const&) Previously libc++ has tried to support tags derived from 'allocator_arg_t' by using 'is_base_of<AllocArgT, allocator_arg_t>'. However this breaks whenever a 2-tuple contains a reference to an incomplete type as its first parameter. See https://llvm.org/bugs/show_bug.cgi?id=27684 llvm-svn: 273334
* Fix warning in tuple tests. The test suite should now run clean with most ↵Eric Fiselier2016-06-151-8/+3
| | | | | | warnings enabled llvm-svn: 272822
* Improve portability of hash tests. Patch from STL@microsoft.comEric Fiselier2016-06-151-3/+5
| | | | llvm-svn: 272744
* Fix bad test that was previously getting ifdef-ed awayEric Fiselier2016-06-141-2/+2
| | | | llvm-svn: 272722
* Replace __cplusplus comparisons and dialect __has_feature checks with ↵Eric Fiselier2016-06-1436-47/+101
| | | | | | | | | TEST_STD_VER. This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! llvm-svn: 272716
* Fix warnings in tests.Eric Fiselier2016-06-145-3/+19
| | | | llvm-svn: 272629
* Prevent truncation warning. Patch from STL@microsoft.comEric Fiselier2016-06-141-1/+1
| | | | llvm-svn: 272621
* Remove _LIBCPP_TRIVIAL_PAIR_COPY_CTOR option.Eric Fiselier2016-06-143-6/+94
| | | | llvm-svn: 272613
* [libcxx] Fix c++98 test failures.Asiri Rathnayake2016-06-038-8/+8
| | | | | | | | | Adds XFAIL/UNSUPPORTED lit tags as appropriate. Gets a clean test run for -std=c++98 on Fedora 20. NFC. llvm-svn: 271741
* Add not_fn test for throwing operator!Eric Fiselier2016-06-021-0/+8
| | | | llvm-svn: 271502
* Mark LWG issue 2545 as complete. Add extra testsEric Fiselier2016-06-022-0/+132
| | | | llvm-svn: 271489
* Fix leak in __enable_weak_this(). Thanks to Arthur O'Dwyer for finding it.Eric Fiselier2016-06-021-1/+33
| | | | llvm-svn: 271487
* Mark LWG issue 2250 as completeEric Fiselier2016-06-027-90/+74
| | | | llvm-svn: 271475
* Mark LWG issue 2450 as complete.Eric Fiselier2016-06-027-6/+80
| | | | llvm-svn: 271473
* Add C++17 std::not_fn negator.Eric Fiselier2016-06-022-0/+578
| | | | | | | | | | | | | | | Summary: Exactly what it sounds like. I plan to commit this in a couple of days assuming no objections. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20799 llvm-svn: 271464
* Remove enable_shared_from_this test since it leaks the control block and ↵Eric Fiselier2016-06-021-26/+0
| | | | | | fails with ASAN llvm-svn: 271459
* Implement P0033R1 - Re-enabling shared_from_thisEric Fiselier2016-06-021-0/+86
| | | | | | | | | | | | Summary: See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0033r1.html Reviewers: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19254 llvm-svn: 271449
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-0162-101/+101
| | | | llvm-svn: 271435
* Mark LWG issue 2520 as completeEric Fiselier2016-05-313-0/+16
| | | | llvm-svn: 271249
* Mark LWG issue 2565 as complete. Update the tests to check it.Eric Fiselier2016-05-312-28/+100
| | | | llvm-svn: 271238
* [libcxx] Improve tests to use the UNSUPPORTED lit directiveAsiri Rathnayake2016-05-2824-94/+33
| | | | | | | | | | | | | | | | | | | Quite a few libcxx tests seem to follow the format: #if _LIBCPP_STD_VER > X // Do test. #else // Empty test. #endif We should instead use the UNSUPPORTED lit directive to exclude the test on earlier C++ standards. This gives us a more accurate number of test passes for those standards and avoids unnecessary conflicts with other lit directives on the same tests. Reviewers: bcraig, ericwf, mclow.lists Differential revision: http://reviews.llvm.org/D20730 llvm-svn: 271108
* Guard testing of tuple extensions to make tests portableEric Fiselier2016-05-275-2/+16
| | | | llvm-svn: 271065
* Add a test for uniqueptr having either NULL and nullptrMarshall Clow2016-05-161-0/+6
| | | | llvm-svn: 269665
* Apply D20014 - fix a missing return in a test. Fixes PR#27720Marshall Clow2016-05-121-1/+1
| | | | llvm-svn: 269298
* Change allocator<T>::allocate to throw length_error, not bad_allocEric Fiselier2016-05-071-3/+5
| | | | llvm-svn: 268842
* Removing some trailing whitespaceEric Fiselier2016-05-042-2/+2
| | | | llvm-svn: 268543
* Fix PR27538. Remove __is_convertible specializations for array and function ↵Eric Fiselier2016-05-031-2/+46
| | | | | | | | | | | | | types. This patch fixes a bunch of bugs in the fallback implementation of is_convertible, which is used by GCC. Removing the "__is_convertible" specializations for array/function types we fallback on the SFINAE test, which is more correct. See https://llvm.org/bugs/show_bug.cgi?id=27538 llvm-svn: 268359
* Void cast runtime-unused variables. Patch from STL@microsoft.comEric Fiselier2016-05-024-5/+24
| | | | llvm-svn: 268284
* Fix or move various non-standard tests.Eric Fiselier2016-04-291-71/+0
| | | | | | | | | | | | This patch does the following: * Remove <__config> includes from some container tests. * Guards uses of std::launch::any in async tests because it's an extension. * Move "test/std/extensions" to "test/libcxx/extensions" * Moves various non-standard tests including those in "sequences/vector", "std/localization" and "utilities/meta". llvm-svn: 267981
* Move INVOKE tests into test/libcxx sub-tree.Eric Fiselier2016-04-296-1419/+16
| | | | | | | | | Testing the concrete implementation of INVOKE means calling the implementation specific names `__invoke` and `__invoke_constexpr`. For this reason the test are non-standard. For this reason it's best if the tests live outside of the `test/std` directory. llvm-svn: 267973
* Add proper include for unique_ptr. Patch from STL@microsoft.comEric Fiselier2016-04-291-0/+1
| | | | llvm-svn: 267958
* Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macrosEric Fiselier2016-04-281-1/+1
| | | | llvm-svn: 267947
* Remove names of unreferenced parameters. Patch from STL@microsoft.comEric Fiselier2016-04-284-6/+6
| | | | llvm-svn: 267852
* Add braces, move braces, and rename variables to avoid shadowing. Patch from ↵Eric Fiselier2016-04-281-2/+2
| | | | | | STL@microsoft.com llvm-svn: 267844
OpenPOWER on IntegriCloud