summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.Stephan T. Lavavej2016-11-04251-313/+603
| | | | | | | | | | | This replaces every occurrence of _LIBCPP_STD_VER in the tests with TEST_STD_VER. Additionally, for every affected file, #include "test_macros.h" is being added explicitly if it wasn't already there. https://reviews.llvm.org/D26294 llvm-svn: 286007
* Implement another part of P0031; adding constexpr to move_iteratorMarshall Clow2016-11-0224-0/+349
| | | | llvm-svn: 285818
* Remove spurious token from #endifRoger Ferrer Ibanez2016-11-021-1/+1
| | | | llvm-svn: 285792
* Protect tests for new/delete under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-024-5/+20
| | | | | | | | Skip the tests that expect an exception be thrown and protect unreachable catch blocks. Differential Revision: https://reviews.llvm.org/D26197 llvm-svn: 285791
* Fix __libcpp_is_constructible for source types with explicit conversion ↵Eric Fiselier2016-11-021-2/+118
| | | | | | | | | | | | | | | | | | | | | | operators. Previously __libcpp_is_constructible checked the validity of reference construction using 'eat<To>(declval<From>())' but this doesn't consider From's explicit conversion operators. This patch teaches __libcpp_is_constructible how to handle these cases. To do this we need to check the validity using 'static_cast<To>(declval<From>())'. Unfortunately static_cast allows additional base-to-derived and lvalue-to-rvalue conversions, which have to be checked for and manually rejected. While implementing these changes I discovered that Clang incorrectly rejects `static_cast<int&&>(declval<float&>())` even though `int &&X(declval<float&>())` is well formed. In order to tolerate this bug the `__eat<T>(...)` needs to be left in-place. Otherwise it could be replaced entirely with the new static_cast implementation. Thanks to Walter Brown for providing the test cases. llvm-svn: 285786
* Protect exceptional paths under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0128-248/+598
| | | | | | | | | | | | | | | | | | | | | | These tests are of the form try { action-that-may-throw assert(!exceptional-condition) assert(some-other-facts) } catch (relevant-exception) { assert(exceptional-condition) } Under libcpp-no-exceptions there is still value in verifying some-other-facts while avoiding the exceptional case. So for these tests just conditionally check some-other-facts if exceptional-condition is false. When exception are supported make sure that a true exceptional-condition throws an exception Differential Revision: https://reviews.llvm.org/D26136 llvm-svn: 285697
* Protect lock tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0113-18/+86
| | | | | | | | Skip tests that expect an exception to be thrown. Differential Revision: https://reviews.llvm.org/D26184 llvm-svn: 285695
* Protect tests that expect an exception for an unknown std::random_deviceRoger Ferrer Ibanez2016-11-012-2/+4
| | | | | | | | Skip these tests under libcpp-no-exceptions. Differential Revision: https://reviews.llvm.org/D26141 llvm-svn: 285677
* Change from "XFAIL: libcpp-no-exceptions" to "UNSUPPORTED: ↵Roger Ferrer Ibanez2016-10-3122-22/+22
| | | | | | | | | | | | | libcpp-no-exceptions" tests that only check exceptions and nothing else This is a follow up of D24562. These tests do not check anything but exceptions, so it makes sense to mark them as UNSUPPORTED under a library built without exceptions. Differential Revision: https://reviews.llvm.org/D26075 llvm-svn: 285550
* Fix _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY to always have default visibility.Eric Fiselier2016-10-311-0/+5
| | | | | | | | | | | This prevent the symbols from being both externally available and hidden, which causes them to be linked incorrectly. This is only a problem when the address of the function is explicitly taken since it will always be inlined otherwise. This patch fixes the issues that caused r285456 to be reverted, and can now be reapplied. llvm-svn: 285531
* Add more tests for optional<const T>Eric Fiselier2016-10-286-0/+29
| | | | llvm-svn: 285384
* [libcxx] Make regex_match backtrack when search failsTim Shen2016-10-271-10/+52
| | | | | | | | | | | | | | | | Summary: Fixes PR19851. alg.re.match/ecma.pass.cpp still XFAILS on linux, but after commenting out locale-related tests, it passes. I don't have a freebsd machine to produce a full pass. Reviewers: mclow.lists Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D26026 llvm-svn: 285352
* [PATCH] D25483: [libcxx] [test] Fix non-Standard assumptions about how many ↵Stephan T. Lavavej2016-10-2712-16/+31
| | | | | | elements are allocated llvm-svn: 285346
* Cleanup nonportable behavior in tests for std::anyCasey Carter2016-10-263-8/+4
| | | | | | | | | | | | | | | | | Fixes MS issues 63, 64, and 65. test/std/utilities/any/any.class/any.cons/move.pass.cpp: * "Moves are always destructive" is not a portable assumption; check with LIBCPP_ASSERT. test/std/utilities/any/any.class/any.cons/value.pass.cpp: * The standard does not forbid initializing std::any from any pointer-to-function type. Remove the non-conforming "DecayTag" test. test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp: * Self-swap is not specified to perform no moves; check with LIBCPP_ASSERT. Differential Revision: https://reviews.llvm.org/D26007 llvm-svn: 285234
* Fix nullptr testsEric Fiselier2016-10-251-8/+17
| | | | llvm-svn: 285117
* Fix non-portable tests for temp_directory_path(...)Eric Fiselier2016-10-241-8/+11
| | | | llvm-svn: 285020
* Add missing include in string_view tests. Patch from Billy ONeil @ microsoftEric Fiselier2016-10-241-0/+1
| | | | llvm-svn: 285012
* Fix shadow warnings in string_view tests. Patch from STL@microsoft.comEric Fiselier2016-10-242-22/+20
| | | | llvm-svn: 285011
* Fix libc++ specific assertion in permissions(...) testsEric Fiselier2016-10-231-1/+2
| | | | llvm-svn: 284945
* Make make_from_tuple tests more portable. Patch from STL@microsoft.comEric Fiselier2016-10-231-4/+4
| | | | llvm-svn: 284943
* Fix unreferenced parameters. Patch from STL@microsoft.comEric Fiselier2016-10-233-3/+3
| | | | llvm-svn: 284942
* Fix shadowing warning. Patch from STL@microsoft.comEric Fiselier2016-10-231-1/+1
| | | | llvm-svn: 284941
* [libcxx] Support std::regex_constants::match_not_nullTim Shen2016-10-211-0/+46
| | | | | | | | | | | | Summary: Fixes PR21597. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25595 llvm-svn: 284881
* Adding a missing constexpr test for reverse_iterator operator[].Marshall Clow2016-10-201-0/+11
| | | | llvm-svn: 284731
* Attempt to workaround XPASS for aligned allocation testsEric Fiselier2016-10-204-4/+8
| | | | llvm-svn: 284691
* Implement constexpr support for reverse_iterator. Reviewed as ↵Marshall Clow2016-10-1923-23/+366
| | | | | | https://reviews.llvm.org/D25534 llvm-svn: 284602
* Make any_cast<void()>(nullptr) compileEric Fiselier2016-10-161-0/+13
| | | | llvm-svn: 284333
* Update LWG 2767 and add test caseEric Fiselier2016-10-161-0/+14
| | | | llvm-svn: 284324
* Update status for std::optional LWG issues and fix an optional SFINAE bugEric Fiselier2016-10-162-0/+15
| | | | llvm-svn: 284323
* Update issue status for LWG 2744Eric Fiselier2016-10-164-17/+25
| | | | llvm-svn: 284322
* Update issue status for LWG 2768 and 2769Eric Fiselier2016-10-164-42/+72
| | | | llvm-svn: 284321
* Implement LWG 2712 and update other issues statusEric Fiselier2016-10-161-2/+26
| | | | llvm-svn: 284318
* Implement LWG 2681 and 2682Eric Fiselier2016-10-161-0/+41
| | | | llvm-svn: 284316
* Implement LWG 2672.Eric Fiselier2016-10-151-0/+29
| | | | llvm-svn: 284314
* Implement modified LWG 2665Eric Fiselier2016-10-151-0/+8
| | | | llvm-svn: 284313
* Prevent new/delete replacement tests from being optimized away.Eric Fiselier2016-10-147-37/+31
| | | | llvm-svn: 284289
* Clarify XFAIL commentsEric Fiselier2016-10-142-2/+4
| | | | llvm-svn: 284282
* XFAIL aligned allocation tests for older Clang versionsEric Fiselier2016-10-148-18/+28
| | | | llvm-svn: 284214
* XFAIL aligned allocation test failures with UBSANEric Fiselier2016-10-144-9/+10
| | | | llvm-svn: 284210
* Add void_t and invoke feature test macrosEric Fiselier2016-10-142-0/+75
| | | | llvm-svn: 284209
* Implement P0035R4 -- Add C++17 aligned allocation functionsEric Fiselier2016-10-1411-0/+845
| | | | | | | | | | | | | | | | Summary: This patch implements the library side of P0035R4. The implementation is thanks to @rsmith. In addition to the C++17 implementation, the library implementation can be explicitly turned on using `-faligned-allocation` in all dialects. Reviewers: mclow.lists, rsmith Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D25591 llvm-svn: 284206
* Implement http://wg21.link/p0302r1: Removing Allocator Support in ↵Marshall Clow2016-10-1312-0/+210
| | | | | | std::function. These functions never worked, and as far as I know, no one ever called them. llvm-svn: 284164
* Add missing include in test; NFC. Thanks to Jonathan Wakely for the report.Marshall Clow2016-10-131-0/+1
| | | | llvm-svn: 284120
* Disable trivial pair copy/move tests when unsupportedDimitry Andric2016-10-121-0/+6
| | | | | | | | | | | | | | | | | | Summary: On FreeBSD, for ABI compatibility reasons, the pair trivial copy constructor is disabled, using the aptly-named `_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR` define. Disable the related tests when this define is on, so they don't fail unexpectedly. Reviewers: emaste, rsmith, theraven, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25449 llvm-svn: 284047
* Remove usages of _LIBCPP_CONSTEXPR under test/stdEric Fiselier2016-10-125-16/+26
| | | | llvm-svn: 284002
* Remove usages of _ALIGNAS_TYPEEric Fiselier2016-10-125-5/+15
| | | | llvm-svn: 283999
* Remove use of _VSTD::__invoke in the not_fn testsEric Fiselier2016-10-121-1/+4
| | | | llvm-svn: 283991
* Implement N4606 optionalEric Fiselier2016-10-1273-1/+6357
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adapt implementation of Library Fundamentals TS optional into an implementation of N4606 optional. - Update relational operators per http://wg21.link/P0307 - Update to requirements of http://wg21.link/P0032 - Extension: Implement trivial copy/move construction/assignment for `optional<T>` when `T` is trivially copyable. Audit P/Rs for optional LWG issues: - 2756 "C++ WP optional<T> should 'forward' T's implicit conversions" Implemented, which also resolves 2753 "Optional's constructors and assignments need constraints" (modulo my refusal to explicitly delete the move operations, which is a design error that I'm working on correcting in the 2756 P/R). - 2736 "nullopt_t insufficiently constrained" Already conforming. I've added a test ensuring that `nullopt_t` is not copy-initializable from an empty braced-init-list, which I believe is the root intent of the issue, to avoid regression. - 2740 "constexpr optional<T>::operator->" Already conforming. - 2746 "Inconsistency between requirements for emplace between optional and variant" No P/R, but note that the author's '"suggested resolution" is already implemented. - 2748 "swappable traits for optionals" Already conforming. - 2753 "Optional's constructors and assignments need constraints" Implemented. Most of the work for this patch was done by Casey Carter @ Microsoft. Thank you Casey! Reviewers: mclow.lists, CaseyCarter, EricWF Differential Revision: https://reviews.llvm.org/D22741 llvm-svn: 283980
* Revert Add <optional>. Will recommit with better commit messageEric Fiselier2016-10-1273-6347/+1
| | | | llvm-svn: 283978
* Add <optional> header.Eric Fiselier2016-10-1273-1/+6347
| | | | | | | | This patch is largely thanks to Casey Carter @ Microsoft. He did the initial work of porting our experimental implementation and tests over to namespace std. llvm-svn: 283977
OpenPOWER on IntegriCloud