summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a bit more to one of the chrono testsMarshall Clow2017-03-211-0/+11
| | | | llvm-svn: 298418
* Implement P0548: 'common_type and duration' This involves a subtle change in ↵Marshall Clow2017-03-213-4/+41
| | | | | | the return type of the unary +/- operators for std::chrono::duration, though I expect that no one will notice. llvm-svn: 298416
* Implement LWG#2761: 'basic_string should require that charT match ↵Marshall Clow2017-03-152-1/+25
| | | | | | traits::char_type'. Tests for string_view, too llvm-svn: 297872
* Add deployment knobs to tests (for Apple platforms)Mehdi Amini2017-03-1528-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests for libc++ specify -target on the command-line to the compiler, but this is problematic for a few reasons. Firstly, the -target option isn't supported on Apple platforms. Parts of the triple get dropped and ignored. Instead, software should be compiled with a combination of the -arch and -m<name>-version-min options. Secondly, the generic "darwin" target references a kernel version instead of a platform version. Each platform has its own independent versions (with different versions of libc++.1.dylib), independent of the version of the Darwin kernel. This commit adds support to the LIT infrastructure for testing against Apple platforms using -arch and -platform options. If the host is not on OS X, or the compiler type is not clang or apple-clang, then this commit has NFC. If the host is on OS X and --param=target_triple=... is specified, then a warning is emitted to use arch and platform instead. Besides the warning, there's NFC. If the host is on OS X and *no* target-triple is specified, then use the new deployment target logic. This uses two new lit parameters, --param=arch=<arch> and --param=platform=<platform>. <platform> has the form <name>[<version>]. By default, arch is auto-detected from clang -dumpmachine, and platform is "macosx". If the platform doesn't have a version: For "macosx", the version is auto-detected from the host system using sw_vers. This may give a different version than the SDK, since new SDKs can be installed on older hosts. Otherwise, the version is auto-detected from the SDK version using xcrun --show-sdk-path. -arch <arch> -m<name>-version-min=<version> is added to the compiler flags. The target triple is computed as <arch>-apple-<platform>. It is *not* passed to clang, but it is available for XFAIL and UNSUPPORTED (as is with_system_cxx_lib=<target>). For convenience, apple-darwin and <arch>-apple-darwin are added to the set of available features. There were a number of tests marked to XFAIL on x86_64-apple-darwin11 and x86_64-apple-darwin12. I updated these to x86_64-apple-macosx10.7 and x86_64-apple-macosx10.8. llvm-svn: 297798
* 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
* fix test coverage capture dirsEric Fiselier2017-03-111-1/+5
| | | | llvm-svn: 297555
* Fix DoNotOptimize on MSVCEric Fiselier2017-03-111-2/+4
| | | | llvm-svn: 297532
* Implement LWG 2787 - [file_status.cons] is inconsistentEric Fiselier2017-03-061-2/+2
| | | | llvm-svn: 297071
* Remove the buildit and testit scripts; they haven't been supported in yearsEric Fiselier2017-03-031-183/+0
| | | | llvm-svn: 296922
* Fix hash requirements check in __hash_table.Eric Fiselier2017-03-031-2/+36
| | | | | | | | | | | | | | r296565 attempted to add better diagnostics when an unordered container is instantiated with a hash that doesn't meet the Hash requirements. However I mistakenly checked the wrong set of requirements. Specifically it checked if the hash met the requirements for specializations of std::hash. However these requirements are stricter than the generic Hash requirements. This patch fixes the assertions to only check the Hash requirements. llvm-svn: 296919
* 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
* remove max_size() extension from polymorphic_allocator. It is unneededEric Fiselier2017-03-021-65/+0
| | | | llvm-svn: 296831
* 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-014-4/+4
| | | | | | | | | 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
* Generate the test configuration even when LIBCXX_INCLUDE_TESTS=OFF.Eric Fiselier2017-03-011-7/+8
| | | | | | | | | | This patch changes the CMake configuration so that it always generates the test/lit.site.cfg file, even when testing is disabled. This allows users to test libc++ without requiring them to have a full LLVM checkout on their machine. llvm-svn: 296685
* Mark test as unsupported in C++11Eric Fiselier2017-03-011-1/+5
| | | | llvm-svn: 296571
* Fix test failures due to bad test hasherEric Fiselier2017-03-0118-0/+24
| | | | llvm-svn: 296568
* Improve diagnostics when an invalid hash is used in an unordered container.Eric Fiselier2017-03-011-0/+32
| | | | | | | | | This patch adds a static assertion that the specified hash meets the requirements of an enabled hash, and it ensures that the static assertion is evaluated before __compressed_pair is instantiated. That way the static assertion diagnostic is emitted first. llvm-svn: 296565
* 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
* Fix cmake dependency for the external-thread-library variant. NFC.Asiri Rathnayake2017-02-271-1/+1
| | | | llvm-svn: 296338
* 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
* test: explicitly size enumerationSaleem Abdulrasool2017-02-181-1/+1
| | | | | | | On certain targets, enumerations may be smaller than an `unsigned long`. Use an explicitly sized enumeration. llvm-svn: 295558
* 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
* Add doc for _LIBCPP_ENABLE_CXX17_DISABLED_AUTO_PTR and make it work under ↵Eric Fiselier2017-02-171-0/+4
| | | | | | _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES llvm-svn: 295407
* [libcxx] Remove unexpected handlers in C++17Eric Fiselier2017-02-179-0/+160
| | | | | | | | | | | | | | | | | | | 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-172-1/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: mark another test as requiring pthreadsSaleem Abdulrasool2017-02-131-0/+1
| | | | | | | This is checking pthread specific behaviour. Add a requirement on pthreads. llvm-svn: 294956
* 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
* test: XFAIL windows for non-portable testSaleem Abdulrasool2017-02-101-0/+1
| | | | | | | | This test validates that the lock_guard is declared variadically across C++03 and C++11. Given the lack of stable ABI on Windows and the fact that the RTTI encoding on Windows is different, XFAIL it on that target. llvm-svn: 294720
* test: fix test under WindowsSaleem Abdulrasool2017-02-101-1/+1
| | | | | | | When running the test under clang-cl, we do not report `__GNUC__`, which is needed to supress the warnings which are being treated as errors. llvm-svn: 294719
OpenPOWER on IntegriCloud