summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
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-17123-0/+10116
| | | | | | | | | | | | | | 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
* 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-14823-980/+1075
| | | | | | | | | 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
* Implement variadic lock_guard.Eric Fiselier2016-06-148-28/+410
| | | | | | | | | | | | | | | | | | | | 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
* Fix warnings in tests.Eric Fiselier2016-06-1411-41/+51
| | | | 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-1027-0/+27
| | | | | | | | | | | | | | 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-01348-949/+949
| | | | llvm-svn: 271435
* Cleanup non-standard tests as reported by STL@microsoft.com. NFC.Eric Fiselier2016-06-0119-59/+2
| | | | | | | | | | | | | | | 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
* 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-301-1/+1
| | | | llvm-svn: 271195
* [libcxx] Improve tests to use the UNSUPPORTED lit directiveAsiri Rathnayake2016-05-28114-524/+147
| | | | | | | | | | | | | | | | | | | 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
* Tolerate incorrect return type for 'isinf' and 'isnan' in tests.Eric Fiselier2016-05-276-126/+96
| | | | | | | | | | | | | | | | | | Summary: GLIBC recently removed the incorrect `int isinf(double)` and `int isnan(double)` overloads in C++11 and greater. This causes previously `XFAIL: linux` tests to start passing. Since there is no longer a way to 'XFAIL' the tests I choose to simply tolerate this bug. See https://sourceware.org/bugzilla/show_bug.cgi?id=19439 Reviewers: rsmith, mclow.lists, EricWF Subscribers: jroelofs, cfe-commits Differential Revision: http://reviews.llvm.org/D19835 llvm-svn: 271060
* Test hijacking ADL for operator& in the stream iterator constructors.Eric Fiselier2016-05-172-3/+30
| | | | llvm-svn: 269838
* Add test for r269789Eric Fiselier2016-05-171-0/+2
| | | | llvm-svn: 269812
OpenPOWER on IntegriCloud