summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix a couple of warnings present in the filesystem tests.Eric Fiselier2016-06-173-4/+16
| | | | llvm-svn: 273035
* Add Filesystem TS -- CompleteEric Fiselier2016-06-17137-0/+11791
| | | | | | | | | | | | | | Add the completed std::experimental::filesystem implementation and tests. The implementation supports C++11 or newer. The TS is built as part of 'libc++experimental.a'. Users of the TS need to manually link this library. Building and testing the TS can be disabled using the CMake option '-DLIBCXX_ENABLE_FILESYSTEM=OFF'. Currently 'libc++experimental.a' is not installed by default. To turn on the installation of the library use '-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON'. llvm-svn: 273034
* 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
* Add -Wno-unused-command-line-argument when running the test suite to prevent ↵Eric Fiselier2016-06-151-0/+1
| | | | | | errors llvm-svn: 272809
* [libcxx] [test] In test/support/test_allocator.h, fix construct() to avoid ↵Eric Fiselier2016-06-151-11/+12
| | | | | | | | | | | | | | | | | moving immovable types. Summary: In test/support/test_allocator.h, fix construct() to avoid moving immovable types. This improves the allocator's conformance, and fixes compiler errors with MSVC's STL. The scenario is when the allocator is asked to construct an object of type X that's immovable (deleted copy/move ctors), but implicitly constructible from an argument type A. When perfectly forwarded, X can be (explicitly) constructed from A, and everything is fine. That's std::allocator's behavior, and the Standard's default when a user allocator's construct() doesn't exist. The previous implementation of construct() here mishandled this scenario. Passing A to this construct() would implicitly construct an X temporary, bound to (non-templated) T&&. Then construct() would attempt to move-construct X from that X temporary, but X is immovable, boom. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21094 llvm-svn: 272747
* Improve portability of random_device tests. Patch from STL@microsoft.comEric Fiselier2016-06-152-2/+6
| | | | llvm-svn: 272746
* Improve portability of vector tests. Patch from STL@microsoft.comEric Fiselier2016-06-151-1/+1
| | | | llvm-svn: 272745
* Improve portability of hash tests. Patch from STL@microsoft.comEric Fiselier2016-06-152-6/+10
| | | | 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-14827-988/+1085
| | | | | | | | | 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
* Found a couple bugs in the test suite. No functionality change.Marshall Clow2016-06-143-2/+6
| | | | llvm-svn: 272679
* Update errcat.objects tests so they test the bug fixed in r272640.Eric Fiselier2016-06-142-6/+11
| | | | llvm-svn: 272642
* Avoid octal escape sequence warning with MSVC. Patch from STL@microsoft.comEric Fiselier2016-06-142-3/+3
| | | | llvm-svn: 272639
* Add missing includeEric Fiselier2016-06-141-0/+2
| | | | llvm-svn: 272638
* Temporarily XFAIL variadic lock_guard mangling test for GCC 4.9Eric Fiselier2016-06-141-1/+5
| | | | llvm-svn: 272637
* Implement variadic lock_guard.Eric Fiselier2016-06-149-28/+441
| | | | | | | | | | | | | | | | | | | | Summary: This patch implements the variadic `lock_guard` paper. Making `lock_guard` variadic is a ABI breaking change because the specialization `lock_guard<_Mutex>` mangles differently then when it was the primary template. This change only provides variadic `lock_guard` in ABI V2 or when `_LIBCPP_ABI_VARIADIC_LOCK_GUARD` is defined. Note that in ABI V2 `lock_guard` must always be declared as a variadic template, even in C++03, in order to keep the ABI consistent. For this reason `lock_guard` is forward declared as a variadic template in all standard dialects and therefore depends on variadic templates being provided as an extension in C++03. All supported versions of Clang and GCC provide this extension. Reviewers: mclow.lists Subscribers: K-ballo, mclow.lists, cfe-commits Differential Revision: http://reviews.llvm.org/D21260 llvm-svn: 272634
* Make system_error::message() thread safe. Fixes PR25598.Eric Fiselier2016-06-142-0/+23
| | | | | | | | | | | | | | | | | | | | Summary: system_error::message() uses `strerror` for the generic and system categories. This function is not thread safe. The fix is to use `strerror_r`. It has been available since 2001 for GNU libc and since BSD 4.4 on FreeBSD/OS X. On platforms with GNU libc the extended version is used which always returns a valid string, even if an error occurs. In single-threaded builds `strerror` is still used. See https://llvm.org/bugs/show_bug.cgi?id=25598 Reviewers: majnemer, mclow.lists Subscribers: erik65536, cfe-commits, emaste Differential Revision: http://reviews.llvm.org/D20903 llvm-svn: 272633
* Ignore depricated warnings from <ext/hash_map> and <ext/hash_set>Eric Fiselier2016-06-142-0/+10
| | | | llvm-svn: 272632
* Fix warnings in tests.Eric Fiselier2016-06-1412-42/+52
| | | | llvm-svn: 272629
* Remove unused local var. Patch from STL@microsoft.comEric Fiselier2016-06-141-1/+1
| | | | llvm-svn: 272622
* Prevent truncation warning. Patch from STL@microsoft.comEric Fiselier2016-06-141-1/+1
| | | | llvm-svn: 272621
* Fix vector<bool> tests that were using ints. Patch from STL@microsoft.comEric Fiselier2016-06-145-17/+17
| | | | llvm-svn: 272620
* Rename variables to prevent shadowing. Patch from STL@microsoft.comEric Fiselier2016-06-1432-372/+372
| | | | llvm-svn: 272619
* Avoid name shadowing in test. Patch from STL@microsoft.comEric Fiselier2016-06-141-2/+2
| | | | llvm-svn: 272618
* Silence more unused variable warnings. Patch from STL@microsoft.comEric Fiselier2016-06-141-0/+8
| | | | llvm-svn: 272617
* Remove _LIBCPP_TRIVIAL_PAIR_COPY_CTOR option.Eric Fiselier2016-06-143-6/+94
| | | | llvm-svn: 272613
* Add `REQUIRES: c++experimental` where appropriate.Dan Albert2016-06-1030-0/+30
| | | | | | | | | | | | | | Summary: I haven't added it to all the tests, just those that fail without it (those that aren't header only). Reviewers: EricWF, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21247 llvm-svn: 272443
* Make the comparison objects that we pass in for various tests look more like ↵Marshall Clow2016-06-0940-28/+48
| | | | | | actual comparison objects. No functional change. llvm-svn: 272288
* Avoid Shadowing warnings in the associative containers tests. Thanks to STL ↵Marshall Clow2016-06-074-4/+8
| | | | | | for the patch. llvm-svn: 272018
* Rename some test data (and make it const) to rid us of some shadowing ↵Marshall Clow2016-06-0627-315/+315
| | | | | | warnings in the test suite. No functional change. Thanks to STL@microsoft for the report and patch. llvm-svn: 271919
* Remove arithmetic +/-127 on chars; results in UB when dealing with signed ↵Marshall Clow2016-06-061-8/+13
| | | | | | chars. Thanks to STL@microsoft for the report. llvm-svn: 271897
* [libcxx] Fix c++98 test failures.Asiri Rathnayake2016-06-0322-23/+23
| | | | | | | | | 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
* Fix TEST_HAS_NO_EXCEPTIONS misspelling in the test suite.Eric Fiselier2016-06-021-1/+1
| | | | llvm-svn: 271501
* 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-029-90/+114
| | | | 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-01369-1028/+1028
| | | | llvm-svn: 271435
* Cleanup non-standard tests as reported by STL@microsoft.com. NFC.Eric Fiselier2016-06-0119-3/+5
| | | | | | | | | | | | | | | This patch addresses the following issues in the test suite: 1. Move "std::bad_array_length" test from std/ to libcxx/ test directory since the feature is not a part of the standard. 2. Rename "futures.tas" test directory to "futures.task" since that is the correct stable name. 3. Move tests for "packaged_task<T>::result_type" from std/ to libcxx/ test directory since the typedef is a libc++ extension. llvm-svn: 271430
* Mark LWG issue 2520 as completeEric Fiselier2016-05-313-0/+16
| | | | llvm-svn: 271249
* Add tests that got missed in r271247.Eric Fiselier2016-05-312-0/+106
| | | | llvm-svn: 271248
* Mark LWG issue 2537 as completeEric Fiselier2016-05-312-4/+6
| | | | llvm-svn: 271241
* Mark LWG issue #2585 as completeEric Fiselier2016-05-311-1/+20
| | | | llvm-svn: 271240
* Mark LWG issue 2565 as complete. Update the tests to check it.Eric Fiselier2016-05-312-28/+100
| | | | llvm-svn: 271238
* Make string_view work with -fno-exceptions and get tests passing.Eric Fiselier2016-05-308-57/+102
| | | | llvm-svn: 271237
* Fix bug in test allocator that incorrectly computed the allocation sizeEric Fiselier2016-05-302-4/+5
| | | | llvm-svn: 271195
OpenPOWER on IntegriCloud