summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed unintentional assignment-in-assert in new "extending memory management ↵Billy Robert O'Neal III2017-03-146-6/+6
| | | | | | tools" algorithms. llvm-svn: 297772
* Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and ↵Marshall Clow2017-03-141-1/+32
| | | | | | 2838 as complete - since we do them already llvm-svn: 297752
* Implement LWG 2787 - [file_status.cons] is inconsistentEric Fiselier2017-03-061-2/+2
| | | | llvm-svn: 297071
* Fix libc++ test to pass in C++03 modeMehdi Amini2017-03-032-2/+2
| | | | | | Was hitting: "error: scalar initializer cannot be empty" llvm-svn: 296889
* Clean up more usages of _LIBCPP_HAS_NO_RVALUE_REFERENCESEric Fiselier2017-03-0315-58/+25
| | | | llvm-svn: 296854
* Fix sign-compare warning in test; Oddly this only appears on OS XEric Fiselier2017-03-031-7/+5
| | | | llvm-svn: 296851
* Work around test failure on 32 bit OS XEric Fiselier2017-03-021-6/+13
| | | | llvm-svn: 296840
* Fix libc++ test experimental/algorithms/alg.random.sample/sample.pass.cpp ↵Mehdi Amini2017-03-021-5/+9
| | | | | | when ran in c++11 mode 32 bits llvm-svn: 296830
* Fix test failures caused by new/delete calls getting optimized awayEric Fiselier2017-03-025-5/+13
| | | | llvm-svn: 296813
* Remove more usages of REQUIRES-ANY in the test-suiteEric Fiselier2017-03-0217-17/+17
| | | | llvm-svn: 296727
* Recommit r296712: "Fix Apple-specific XFAIL directive in libc++ test"Mehdi Amini2017-03-021-1/+1
| | | | | | | | The test is passing with c++11 and c++14 but not c++1z on this particular version of the compiler. Try to use lit boolean condition to satisfy this constaint. llvm-svn: 296725
* Revert "Fix Apple-specific XFAIL directive in libc++ test"Mehdi Amini2017-03-021-1/+1
| | | | | | | | | | | This reverts commit r296712. It broke our bot. It turns out that the test is passing with c++11 and c++14 but not c++1z on this particular version of the compiler. Since one job is defaulting to c++1z and the other is testing all config I'm not sure how to fix this... llvm-svn: 296724
* Fix Apple-specific XFAIL directive in libc++ testMehdi Amini2017-03-011-1/+1
| | | | | | | | This tests is failing in XCode 7.0. But Xcode 7.3 that shipped an updated clang has this test passing. This is fixing green dragon which runs this configuration. llvm-svn: 296712
* Fix Apple-specific XFAIL directive in libc++ testMehdi Amini2017-03-012-2/+2
| | | | | | | | | These tests are failing in XCode 8.0, 8.1, and 8.2, but not in Xcode 8.3. Annoyingly the version numbering for clang does not follow Xcode and is bumped to 8.1 only in Xcode 8.3. So Xfailing apple-clang-8.0 should catch all cases here. llvm-svn: 296704
* Fix test failures due to bad test hasherEric Fiselier2017-03-0118-0/+24
| | | | llvm-svn: 296568
* Fix PR32097 - is_abstract doesn't work on class templates.Eric Fiselier2017-03-011-0/+10
| | | | | | | | | | This patch fixes llvm.org/PR32097 by using the __is_abstract builtin type-trait instead of the previous library-only implementation. All supported compilers provide this trait. I've tested as far back as Clang 3.2, GCC 4.6 and MSVC trunk. llvm-svn: 296561
* Updated the XFAIL comment in variant tests.Michael Park2017-03-012-2/+8
| | | | | | | | | | | | | | Summary: `ConstexprTestTypes::NoCtors` is an aggregate type (and consequently a literal type) in C++17, but not in C++14 since it has a base class. This patch updates the comment to accurately describe the reason for the XFAIL. Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D30481 llvm-svn: 296558
* Remove XFAIL in implicit_deduction_guides testsSteven Wu2017-02-272-8/+0
| | | | | | | | The clang assertion causing these tests failing with sanitizer is fixed in r295794. All the bots running libcxx tests should be upgraded and running the compiler with the fix. llvm-svn: 296385
* test: silence warnings on clang under clang-clSaleem Abdulrasool2017-02-181-1/+1
| | | | | | | When running under clang-cl mode, we do not define `__GNUC__`, resulting in the test failing. llvm-svn: 295560
* Update all bug URL's to point to https://bugs.llvm.org/...Eric Fiselier2017-02-1727-32/+32
| | | | llvm-svn: 295434
* Remove dead code in testEric Fiselier2017-02-171-2/+0
| | | | llvm-svn: 295423
* add implicit deduction guide tests for string_viewEric Fiselier2017-02-171-0/+71
| | | | llvm-svn: 295422
* Work around Clang assertion when testing C++17 deduction guides with '-g'.Eric Fiselier2017-02-171-0/+4
| | | | llvm-svn: 295417
* [libcxx] Remove unexpected handlers in C++17Eric Fiselier2017-02-174-0/+8
| | | | | | | | | | | | | | | | | | | Summary: This patch implements [P0003R5](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html) which removes exception specifications from C++17. The only changes to the library are removing `set_unexpected`, `get_unexpected`, `unexpected`, and `unexpected_handler`. These functions can be re-enabled in C++17 using `_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS`. @mclow.lists what do you think about removing stuff is this way? Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: mclow.lists, cfe-commits Differential Revision: https://reviews.llvm.org/D28172 llvm-svn: 295406
* [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible ↵Eric Fiselier2017-02-171-0/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* add tests for ENAMETOOLONGEric Fiselier2017-02-172-9/+25
| | | | llvm-svn: 295390
* Add tests for noexcept functionsEric Fiselier2017-02-133-93/+190
| | | | llvm-svn: 294995
* test: use char32_t rather than wchar_tSaleem Abdulrasool2017-02-122-29/+29
| | | | | | | | | wchar_t is not as portable as char32_t. On Windows, wchar_t is 16-bytes and on Linux 32-bits. The conversion to utf8 causes the characters to exceed the limits on char16_t, resulting in tautological comparisons. llvm-svn: 294917
* test: mark requirement for pthread testSaleem Abdulrasool2017-02-121-0/+1
| | | | | | | | This test explicitly is checking the behaviour of std::thread and pthread interactions. This requires pthreads. Add an appropriate requirement. llvm-svn: 294903
* test: squelch -Wreturn-type errorSaleem Abdulrasool2017-02-121-1/+8
| | | | | | | Add an unreachable marker to avoid a -Wreturn-type error when building on Windows. llvm-svn: 294901
* Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.Marshall Clow2017-02-102-3/+3
| | | | llvm-svn: 294798
* Make lcm/gcd work better in edge cases. Fixes a UBSAN failure.Marshall Clow2017-02-104-5/+19
| | | | llvm-svn: 294779
* Fix PR31916 - std::visit rejects visitors accepting lvalue argumentsEric Fiselier2017-02-091-0/+11
| | | | | | | | | | A static assertion was misfiring since it checked is_callable<Visitor, decltype(__variant_alt<T>.value)>. However the decltype expression doesn't capture the value category as required. This patch applies extra braces to decltype to fix that. llvm-svn: 294612
* [test] Fix hard_link_count test to account for fs with dir nlink==1Michal Gorny2017-02-081-4/+8
| | | | | | | | | | Filesystems are not required to maintain a hard link count consistent with number of subdirectories. For example, on btrfs all directories have nlink==1. Account for that in the test. Differential Revision: https://reviews.llvm.org/D29706 llvm-svn: 294431
* Temporarily disable the LCM/GCD tests under UBSAN.Marshall Clow2017-02-082-0/+3
| | | | llvm-svn: 294417
* Stop using random_shuffle in the libc++ test suite. It's going to be removed ↵Marshall Clow2017-02-0729-37/+124
| | | | | | in c++17. Use shuffle() instead. No change to libc++, just the tests. llvm-svn: 294328
* Add some tests to verify that we implement LWG#2837 correctly. No functional ↵Marshall Clow2017-02-062-0/+14
| | | | | | change. llvm-svn: 294194
* Implement LWG 2773 - std::ignore should be constexpr.Eric Fiselier2017-02-062-0/+77
| | | | | | | | In addition to the PR for LWG 2773 this patch also ensures that each of std::ignores constructors or assignment operators are constexpr. llvm-svn: 294165
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-02-053-5/+5
| | | | | | No functional change, no code review. llvm-svn: 294161
* [libcxx] [test] Fix comment typos.Stephan T. Lavavej2017-02-053-4/+4
| | | | | | No functional change, no code review. llvm-svn: 294160
* [libcxx] [test] Avoid MSVC's non-Standard ABI in underlying_type.pass.cpp.Stephan T. Lavavej2017-02-051-9/+17
| | | | | | | | | | | | When compiled with Clang for Windows, this was emitting "enumerator value evaluates to 4294967295, which cannot be narrowed to type 'int' [-Wc++11-narrowing]". The test should more strenuously avoid poking this ABI deficiency (and it already has coverage for explicitly specified underlying types). Fixes D29140. llvm-svn: 294159
* [libcxx] [test] Fix Clang -Wpessimizing-move "moving a temporary object ↵Stephan T. Lavavej2017-02-051-6/+6
| | | | | | | | | | prevents copy elision". N4618 30.6.6 [futures.unique_future]/12 declares "shared_future<R> share() noexcept;". Fixes D29139. llvm-svn: 294158
* [libcxx] [test] Fix Clang -Wunused-local-typedef, part 3/3.Stephan T. Lavavej2017-02-053-7/+6
| | | | | | | | | | | | | | | | test/std/strings/string.classes/typedefs.pass.cpp Actually test what basic_string's typedefs stand for. test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp NotDerived and ND were completely unused. test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp P2 was mistakenly not being used. Yes, that's right: -Wunused-local-typedef CAUGHT A MISTAKE! AMAZING! Fixes D29137. llvm-svn: 294156
* [libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.Stephan T. Lavavej2017-02-0537-103/+0
| | | | | | | | These typedefs were completely unused. Fixes D29136. llvm-svn: 294155
* [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.Stephan T. Lavavej2017-02-0569-149/+311
| | | | | | | | | | | | | | | | | Guard typedefs and static_asserts with _LIBCPP_VERSION. test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp Additionally deal with conditional compilation. test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp Additionally deal with typedefs used by other typedefs. Fixes D29135. llvm-svn: 294154
* Change the base class of std::bad_optional_access. This is a (subtle) ABI ↵Marshall Clow2017-02-051-3/+3
| | | | | | change, and is in response to http://http://wg21.link/LWG2806, which I *expect* to be adopted in Kona. I am making this change now in anticipation, and will get it into 4.0, because (a) 4.0 is the first release with std::optional, and (b) I don't want to make an ABI-change later, when the user base should be significantly larger. Note that I didn't change std::experimental::bad_optional_access, because that's still specified to derive from std::logic_error. llvm-svn: 294133
* filesystem: fix n4100 conformance for `temp_directory_path`Saleem Abdulrasool2017-02-051-0/+8
| | | | | | | | | N4100 states that an error shall be reported if `!exists(p) || !is_directory(p)`. We were missing the first half of the conditional. Invert the error and normal code paths to make the code easier to follow. llvm-svn: 294127
* Avoid implementation defined behavior in a test.Dan Albert2017-02-021-1/+7
| | | | | | | | | | | | | | | | | Summary: num_put::put uses %p for pointer types, but the exact format of %p is implementation defined behavior for the C library. Compare output to snprintf for portability. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29197 llvm-svn: 293926
* Extend XFAIL to c++98.Asiri Rathnayake2017-02-021-1/+1
| | | | | | NFC. llvm-svn: 293881
* Fix up some no-exception compile failuresMarshall Clow2017-01-311-11/+11
| | | | llvm-svn: 293623
OpenPOWER on IntegriCloud