summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* [NFC] Normalize some test 'main' signaturesJF Bastien2019-01-099-15/+9
| | | | | | There were 3 tests with 'int main(void)', and 6 with the return type on a different line. I'm about to send a patch for main in tests, and this NFC change is unrelated. llvm-svn: 350770
* Mark two UDL tests as being unsupported with Clang 7Eric Fiselier2019-01-092-2/+2
| | | | llvm-svn: 350739
* Mark two more tests as FLAKYEric Fiselier2019-01-092-0/+4
| | | | llvm-svn: 350692
* [libcxx] Optimize vectors construction of trivial types from an iterator ↵Volodymyr Sapsai2019-01-081-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range with const-ness mismatch. We already have a specialization that will use memcpy for construction of trivial types from an iterator range like std::vector<int>(int *, int *); But if we have const-ness mismatch like std::vector<int>(const int *, const int *); we would use a slow path that copies each element individually. This change enables the optimal specialization for const-ness mismatch. Fixes PR37574. Contributions to the patch are made by Arthur O'Dwyer, Louis Dionne. rdar://problem/40485845 Reviewers: mclow.lists, EricWF, ldionne, scanon Reviewed By: ldionne Subscribers: christof, ldionne, howard.hinnant, cfe-commits Differential Revision: https://reviews.llvm.org/D48342 llvm-svn: 350583
* Mark more tests as flakyEric Fiselier2019-01-075-0/+10
| | | | llvm-svn: 350550
* Add the feature test macros that were defined in p1353r0 to the headers of ↵Marshall Clow2019-01-073-1/+35
| | | | | | the appropriate tests. No actual tests yet, so NFC. llvm-svn: 350535
* Fix flaky symlink access time test.Eric Fiselier2019-01-051-5/+7
| | | | | | | | | | | | | | | last_write_time(sym, new_time) changes the modification time of the file referenced by the symlink. But reading through the symlink may change the symlinks's access time. This meant the previous test that checked that the symlinks access time was unchanged was incorrect and made the test flaky. This patch removes this test (there really is no non-flaky way to test that the new access time coorisponds to the time at which the symlink was last dereferenced). This should unflake the test. llvm-svn: 350478
* De-tab a couple tests. NFCMarshall Clow2019-01-033-6/+6
| | | | llvm-svn: 350330
* Fix test case breakages caused by lexically_relative changeEric Fiselier2018-12-211-3/+3
| | | | llvm-svn: 349888
* Fix copy paste error in file_clock testsEric Fiselier2018-12-211-3/+3
| | | | llvm-svn: 349886
* Implement LWG 3096: path::lexically_relative is confused by trailing slashesEric Fiselier2018-12-211-2/+2
| | | | | | path("/dir/").lexically_relative("/dir"); now returns "." instead of "" llvm-svn: 349885
* Implement LWG 3065: Make path operators friends.Eric Fiselier2018-12-213-1/+63
| | | | | | | | | This prevents things like: using namespace std::filesystem; auto x = L"a/b" == std::string("a/b"); llvm-svn: 349884
* Implement LWG 3145: file_clock breaks ABI for C++17 implementations.Eric Fiselier2018-12-214-0/+128
| | | | | | | This patch adds std::chrono::file_clock, but without breaking the existing ABI for std::filesystem. llvm-svn: 349883
* Implement LWG 2936: Path comparison is defined in terms of the generic formatEric Fiselier2018-12-211-1/+54
| | | | | | | | | This patch implements path::compare according to the current spec. The only observable change is the ordering of "/foo" and "foo", which orders the two paths based on having or not having a root directory (instead of lexically comparing "/" to "foo"). llvm-svn: 349881
* [libcxx] Fix order checking in unordered_multimap tests.Louis Dionne2018-12-206-152/+379
| | | | | | | | | | | | | | | Some tests assume that iteration through an unordered multimap elements will return them in the same order as at the container creation. This assumption is not true since the container is unordered, so that no specific order of elements is ever guaranteed for such container. This patch introduces checks verifying that any iteration will return elements exactly from a set of valid values and without repetition, but in no particular order. Reviewed as https://reviews.llvm.org/D54838. Thanks to Andrey Maksimov for the patch. llvm-svn: 349780
* [libcxx] Use custom allocator's `construct` in C++03 when available.Volodymyr Sapsai2018-12-191-1/+1
| | | | | | | | | | | | | | | | | Makes libc++ behavior consistent between C++03 and C++11. Can use `decltype` in C++03 because `include/__config` defines a macro when `decltype` is not available. Reviewers: mclow.lists, EricWF, erik.pilkington, ldionne Reviewed By: ldionne Subscribers: dexonsmith, cfe-commits, howard.hinnant, ldionne, christof, jkorous, Quuxplusone Differential Revision: https://reviews.llvm.org/D48753 llvm-svn: 349676
* Add missing include to test. NFCMarshall Clow2018-12-191-0/+1
| | | | llvm-svn: 349639
* Portability fix: add missing includes and static_casts. Reviewed as ↵Marshall Clow2018-12-1823-4/+34
| | | | | | https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch. llvm-svn: 349566
* Rework the C strings tests to use ASSERT_SAME_TYPE. NFC there. Also change ↵Marshall Clow2018-12-185-135/+148
| | | | | | cwchar.pass.cpp to avoid constructing a couple things from zero - since apparently they can be enums in some weird C library. NFC there, either, since the values were never used. llvm-svn: 349522
* [libcxx] Remove XFAILs for older macOS versionsLouis Dionne2018-12-181-3/+0
| | | | | | | That test doesn't fail anymore since r349378, since the assertions that r349378 removed must have been bugs in the dylib at some point. llvm-svn: 349484
* Fix FP comparisons when SSE isn't availableEric Fiselier2018-12-174-30/+43
| | | | llvm-svn: 349387
* [test] Add target_info for NetBSD, and XFAIL some of locale testsMichal Gorny2018-12-1730-0/+90
| | | | | | | | | | | | | | | | | | | | Add a target_info definition for NetBSD. The definition is based on the one used by FreeBSD, with libcxxrt replaced by libc++abi, and using llvm-libunwind since we need to use its unwinder implementation to build anyway. Additionally, XFAIL the 30 tests that fail because of non-implemented locale features. According to the manual, NetBSD implements only LC_CTYPE part of locale handling. However, there is a locale database in the system and locale specifications are validated against it, so it makes sense to list the common locales as supported. If I'm counting correctly, this change enables additional 43 passing tests. Differential Revision: https://reviews.llvm.org/D55767 llvm-svn: 349379
* [test] [re.traits] Remove asserts failing due to invalid UTF-8Michal Gorny2018-12-171-5/+0
| | | | | | | | | | | Remove the two test cases for \xDA and \xFA with UTF-8 locale, as both characters alone are invalid in UTF-8 (short sequences). Upon removing them, the test passes on Linux again (and also on NetBSD, after adding appropriate locale configuration). Differential Revision: https://reviews.llvm.org/D55746 llvm-svn: 349378
* Unbreak green dragon bots w/o __builtin_launderEric Fiselier2018-12-171-2/+2
| | | | llvm-svn: 349373
* Expect Clang diagnostics in std::launder testEric Fiselier2018-12-171-0/+2
| | | | llvm-svn: 349364
* [test] [ctime] Ignore -Wformat-zero-length warningsMichal Gorny2018-12-161-0/+4
| | | | | | | | | | | | Explicitly disable the -Wformat-zero-length diagnostic when running ctime tests, since one of the test cases passes zero-length format string to strftime(). When strftime() is appropriately decorated with __attribute__(format, ...), this caused the test to fail because of this warning (e.g. on NetBSD). Differential Revision: https://reviews.llvm.org/D55661 llvm-svn: 349294
* Fix static assert diagnostic checks in i386Eric Fiselier2018-12-153-3/+3
| | | | llvm-svn: 349252
* Tolerate Clangs new static_assert messagesEric Fiselier2018-12-144-4/+4
| | | | llvm-svn: 349189
* [libcxx] Mark some tests as still failing on macosx10.14Louis Dionne2018-12-142-0/+2
| | | | llvm-svn: 349187
* Implement P1209 - Adopt Consistent Container Erasure from Library ↵Marshall Clow2018-12-1427-0/+1531
| | | | | | Fundamentals 2 for C++20. Reviewed as https://reviews.llvm.org/D55532 llvm-svn: 349178
* [test] [depr.c.headers] XFAIL uchar.h on NetBSDMichal Gorny2018-12-121-0/+1
| | | | llvm-svn: 348973
* [test] [filesystems] NetBSD can do symlink permissions tooMichal Gorny2018-12-121-1/+1
| | | | llvm-svn: 348968
* [test] [filesystems] Extend FreeBSD tv_sec==-1 workaround to NetBSDMichal Gorny2018-12-121-1/+1
| | | | | | | NetBSD also uses tv_sec==-1 as error status indicator, and does not support setting such a value. llvm-svn: 348967
* [pair] Mark constructors as conditionally noexceptLouis Dionne2018-12-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: std::tuple marks its constructors as noexcept when the corresponding memberwise constructors are noexcept too -- this commit improves std::pair so that it behaves the same. This is a re-application of r348824, which broke the build in C++03 mode because a test was marked as supported in C++03 when it shouldn't be. Note: I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)` constructors because those are non-standard extensions, and supporting them properly is tedious (we have to copy the rvalue-referenceness of the deduced _Tuple&& onto the result of tuple_element). <rdar://problem/29537079> Reviewers: mclow.lists, EricWF Subscribers: christof, llvm-commits Differential Revision: https://reviews.llvm.org/D48669 llvm-svn: 348847
* [libcxx] Fix test on compilers that do not support char8_t yetLouis Dionne2018-12-111-2/+4
| | | | llvm-svn: 348846
* Fix problems with char8_t stuff on compilers that don't support char8_t yetMarshall Clow2018-12-1110-11/+13
| | | | llvm-svn: 348829
* Second part of P0482 - char8_t. Reviewed as https://reviews.llvm.org/D55308Marshall Clow2018-12-1180-101/+1002
| | | | llvm-svn: 348828
* Revert "[pair] Mark constructors as conditionally noexcept"Louis Dionne2018-12-111-3/+2
| | | | | | | This broke the tests on Linux. Reverting until I find out why the tests are broken (tomorrow). llvm-svn: 348825
* [pair] Mark constructors as conditionally noexceptLouis Dionne2018-12-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: std::tuple marks its constructors as noexcept when the corresponding memberwise constructors are noexcept too -- this commit improves std::pair so that it behaves the same. Note: I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)` constructors because those are non-standard extensions, and supporting them properly is tedious (we have to copy the rvalue-referenceness of the deduced _Tuple&& onto the result of tuple_element). <rdar://problem/29537079> Reviewers: mclow.lists, EricWF Subscribers: christof, llvm-commits Differential Revision: https://reviews.llvm.org/D48669 llvm-svn: 348824
* Update a couple of vector<bool> tests that were testing libc++-specific ↵Marshall Clow2018-12-073-10/+17
| | | | | | bahavior. Thanks to Andrey Maksimov for the catch. llvm-svn: 348660
* [libcxx] Remove the availability_markup LIT featureLouis Dionne2018-12-0710-51/+51
| | | | | | | It is now equivalent to the 'availability' LIT feature, so there's no reason to keep both. llvm-svn: 348653
* [libcxx] Fix incorrect XFAILs for chrono tests on old macos deployment targetsLouis Dionne2018-12-063-9/+12
| | | | | | | | | | | | The tests were marked to fail based on the 'availability' LIT feature. However, those tests should really only be failing when we run them against the dylibs that were deployed on macosx10.7 and macosx10.8, which the deployment target has nothing to do with. This caused the tests to unexpectedly pass when running the tests with deployment target macosx10.{7,8} but running with a recent dylib. llvm-svn: 348520
* [libcxx] Add checks for unique value of array<T, 0>.begin() and array<T, ↵Louis Dionne2018-12-061-1/+8
| | | | | | | | | | | | | | | 0>.end() The standard section [array.zero] requires the return value of begin() and end() methods of a zero-sized array to be unique. Eric Fiselier clarifies: "That unique value cannot be null, and must be properly aligned". This patch adds checks for the first part of this clarification: unique value returned by these methods cannot be null. Reviewed as https://reviews.llvm.org/D55366. Thanks to Andrey Maksimov for the patch. llvm-svn: 348509
* [libcxx] Add XFAILs for aligned allocation tests on AppleClang 9Louis Dionne2018-12-068-96/+96
| | | | | | Some people are still running the test suite using AppleClang 9. llvm-svn: 348507
* [libcxx] Make return value of array<T, 0>.data() checked only for libc++Louis Dionne2018-12-062-6/+6
| | | | | | | | | | | The section array.zero says: "The return value of data() is unspecified". This patch marks all checks of the array<T, 0>.data() return value as libc++ specific. Reviewed as https://reviews.llvm.org/D55364. Thanks to Andrey Maksimov for the patch. llvm-svn: 348485
* [libcxx] Mark some tests as failing on macosx 10.14Louis Dionne2018-12-064-0/+4
| | | | llvm-svn: 348437
* [libcxx] Don't depend on availability markup to provide the streams in the dylibLouis Dionne2018-12-0612-27/+8
| | | | | | | | | | | | Whether an explicit instantiation declaration should be provided is not a matter of availability markup. This problem is exemplified by the fact that some tests were incorrectly marked as XFAIL when they should instead have been using the definition of streams from the headers, and hence passing, and that, regardless of whether visibility annotations are enabled. llvm-svn: 348436
* [libcxx] Implement P0318: unwrap_ref_decay and unwrap_referenceLouis Dionne2018-12-032-0/+109
| | | | | | | | | | | | | | | | | | Summary: This was voted into C++20 in San Diego. Note that there was a revision D0318R2 which did include unwrap_reference_t, but we mistakingly voted P0318R1 into the C++20 Working Draft (which does not include unwrap_reference_t). This patch implements D0318R2, which is what we'll end up with in the Working Draft once this mistake has been fixed. Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54485 llvm-svn: 348138
* First part of P0482 - Establish that char8_t is an integral type, and that ↵Marshall Clow2018-11-2933-0/+168
| | | | | | numeric_limits<char8_t> is valid and sane. (second try) llvm-svn: 347930
* [libcxx] Make UNSUPPORTED for std::async test more fine grainedLouis Dionne2018-11-291-1/+8
| | | | | | | | The test was previously marked as unsupported on all Apple platforms, when we really just want to mark it as unsupported for previously shipped dylibs on macosx. llvm-svn: 347920
OpenPOWER on IntegriCloud