summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental
Commit message (Collapse)AuthorAgeFilesLines
...
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-0415-5/+90
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* Diagnose when reverse_iterator is used on path::iterator.Eric Fiselier2017-04-131-7/+5
| | | | | | | | | | | | | | | path::iterator isn't a strictly conforming iterator. Specifically it stashes the current element inside the iterator. This leads to UB when used with reverse_iterator since it requires the element to outlive the lifetime of the iterator. This patch adds a static_assert inside reverse_iterator to disallow "stashing iterator types", and it tags path::iterator as such a type. Additionally this patch removes all uses of reverse_iterator<path::iterator> within the tests. llvm-svn: 300164
* Implement LWG 2787 - [file_status.cons] is inconsistentEric Fiselier2017-03-061-2/+2
| | | | llvm-svn: 297071
* 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
* add tests for ENAMETOOLONGEric Fiselier2017-02-172-9/+25
| | | | llvm-svn: 295390
* 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-102-0/+15
| | | | llvm-svn: 294779
* [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
* [libcxx] [test] Fix comment typos.Stephan T. Lavavej2017-02-051-2/+2
| | | | | | No functional change, no code review. llvm-svn: 294160
* 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
* Implement LWG2733: [fund.ts.v2] gcd / lcm and bool. We already did tbis for ↵Marshall Clow2017-01-248-0/+200
| | | | | | C++17, so replicate the changes in experimental. llvm-svn: 292962
* [libcxx] [test] Fix comment typos, strip trailing whitespace.Stephan T. Lavavej2017-01-1810-14/+14
| | | | | | No functional change, no code review. llvm-svn: 292434
* Fix filesystem::path assignment from {}Eric Fiselier2017-01-182-0/+50
| | | | | | | | Adding `path::operator=(string_type&&)` made the expression `p = {}` ambiguous. This path fixes that ambiguity by making the `string&&` overload a template so it ranks lower during overload resolution. llvm-svn: 292345
* More configuration changes for running the test suite against MSVC's STLEric Fiselier2017-01-181-0/+3
| | | | llvm-svn: 292337
* Fix last_write_time tests for filesystems that don't support negative and ↵Jonas Hahnfeld2017-01-141-29/+63
| | | | | | | | | | | very large times Seems to be the case for NFS. Original patch by Eric Fiselier! Differential Revision: https://reviews.llvm.org/D22452 llvm-svn: 292013
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-01-045-5/+5
| | | | | | Fixes D27786. llvm-svn: 290922
* Fix some 'FIXME's in the tests.Marshall Clow2016-12-304-18/+10
| | | | llvm-svn: 290758
* Fix unused parameters and variablesEric Fiselier2016-12-2331-68/+55
| | | | llvm-svn: 290459
* Enable the -Wsign-compare warning to better support MSVCEric Fiselier2016-12-113-7/+10
| | | | llvm-svn: 289363
* Refactor uses_allocator test types for upcoming fixesEric Fiselier2016-12-095-0/+23
| | | | llvm-svn: 289197
* Adjust libc++ test infastructure to fully support modulesEric Fiselier2016-12-051-16/+16
| | | | | | | | | | | | This patch overhalls the libc++ test format/configuration in order to fully support modules. By "fully support" I mean get almost all of the tests passing. The main hurdle for doing this is handling tests that `#define _LIBCPP_FOO` macros to test a different configuration. This patch deals with these tests in the following ways: 1. For tests that define single `_LIBCPP_ABI_FOO` macros have been annotated with `// MODULES_DEFINES: _LIBCPP_ABI_FOO`. This allows the test suite to define the macro on the command line so it uses a different set of modules. 2. Tests for libc++'s debug mode (which define custom `_LIBCPP_ASSERT`) are automatically detected by the test suite and are compiled and run with modules disabled. This patch also cleans up how the `CXXCompiler` helper class handles enabling/disabling language features. NOTE: This patch uses `LIT` features which were only committed to LLVM today. If this patch breaks running the libc++ tests you probably need to update LLVM. llvm-svn: 288728
* Enable warnings by default for C++ >= 11 and fix -Wshadow occurancesEric Fiselier2016-12-037-11/+14
| | | | llvm-svn: 288557
* Protect optional test under libcpp-no-exceptionsRoger Ferrer Ibanez2016-12-011-3/+6
| | | | | | | | Replace throw with TEST_THROW and skip tests that throw exceptions Differential Revision: https://reviews.llvm.org/D27254 llvm-svn: 288379
* Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests ↵Marshall Clow2016-11-263-0/+177
| | | | | | for the ones in std:: llvm-svn: 287988
* Implement the 'detection idiom' from LFTS v2Marshall Clow2016-11-265-0/+224
| | | | llvm-svn: 287981
* [libcxx] [test] D27027: Strip trailing whitespace.Stephan T. Lavavej2016-11-235-5/+5
| | | | llvm-svn: 287829
* Protect std::experimental::optional tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0713-27/+77
| | | | | | | | | | In these tests there are some paths that explicitly throw, so use the TEST_THROW macro that was proposed for this and then skip the tests that may enter the throwing path. Differential Revision: https://reviews.llvm.org/D26142 llvm-svn: 286099
* [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.Stephan T. Lavavej2016-11-0448-55/+96
| | | | | | | | | | | This replaces every occurrence of _LIBCPP_STD_VER in the tests with TEST_STD_VER. Additionally, for every affected file, #include "test_macros.h" is being added explicitly if it wasn't already there. https://reviews.llvm.org/D26294 llvm-svn: 286007
* Fix non-portable tests for temp_directory_path(...)Eric Fiselier2016-10-241-8/+11
| | | | llvm-svn: 285020
* Fix libc++ specific assertion in permissions(...) testsEric Fiselier2016-10-231-1/+2
| | | | llvm-svn: 284945
* Update status for std::optional LWG issues and fix an optional SFINAE bugEric Fiselier2016-10-161-0/+3
| | | | llvm-svn: 284323
* Implement LWG 2712 and update other issues statusEric Fiselier2016-10-161-2/+26
| | | | llvm-svn: 284318
* Implement LWG 2681 and 2682Eric Fiselier2016-10-161-0/+41
| | | | llvm-svn: 284316
* Implement LWG 2672.Eric Fiselier2016-10-151-0/+29
| | | | llvm-svn: 284314
* Implement modified LWG 2665Eric Fiselier2016-10-151-0/+8
| | | | llvm-svn: 284313
* Fix LWG2683 - filesystem::copy() should always clear the user-provided ↵Eric Fiselier2016-10-111-5/+27
| | | | | | error_code llvm-svn: 283951
* Avoid compile error by giving the test type a user defined default constructorEric Fiselier2016-09-071-1/+1
| | | | llvm-svn: 280780
* Fix PR30260 - optional<const T> not working.Eric Fiselier2016-09-078-0/+94
| | | | | | | | | | This patch fixes PR30260 by using a (void*) cast on the placement argument to placement new to casts away the const. See also http://llvm.org/PR30260. As a drive by change this patch also changes the header guard for <experimental/optional> to _LIBCPP_EXPERIMENTAL_OPTIONAL from _LIBCPP_OPTIONAL. llvm-svn: 280775
* Implement C++17 std::sample.Eric Fiselier2016-08-281-3/+5
| | | | | | | | This patch implements the std::sample function added to C++17 from LFTS. It also removes the std::experimental::sample implementation which now forwards to std::sample. llvm-svn: 279948
* Mark LWG 2716 as complete - shuffle and sample disallows lvalue URNGs.Eric Fiselier2016-08-282-9/+12
| | | | | | | | | | | Libc++'s implementation of shuffle and sample already support lvalue and rvalue RNG's. This patch adds tests for both categories and marks the issue as complete. This patch also contains drive-by change for std::experimental::sample which improves the diagnostics produced when the correct iterator categories are not supplied. llvm-svn: 279947
* Implement LWG 2711. Constrain path members.Eric Fiselier2016-08-284-0/+194
| | | | llvm-svn: 279945
* libcxx: Fix path.compare.pass expected resultAdhemerval Zanella2016-08-151-6/+10
| | | | | | | | | | | | | | | | | | | The expected 'filesystem::path::compare' result states that for different path only result sign contains the information about passed arguments (not its integer value). This is due it uses the output of other compare functions (basic_string_view and char_traits) without further handling and char_traits uses memcmp for final buffer comparison. However for GLIBC on AArch64 the code: int ret = memcmp ("b/a/c", "a/b/c", 1); Results in '64' where for x86_64 it results in '1'. This patch fixes the expected 'filesystem::path::compare' by normalizing all the results before assert comparison. llvm-svn: 278745
* test: relax the FS test a slight bit to be more reliableSaleem Abdulrasool2016-08-111-1/+2
| | | | | | | | | Some filesystems track atime always. This relaxes the test to accept either a filesystem which does not accurately track atime or does track the atime accurately. This allows the test to pass on filesystems mounted with `strictatime` on Linux or on macOS. llvm-svn: 278357
* [libcxx] Add std::anyEric Fiselier2016-08-1113-13/+13
| | | | | | | | | | | | | | | | | | | Summary: This patch adds std::any by moving/adapting <experimental/any>. This patch also implements the std::any parts of p0032r3 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0032r3.pdf) and LWG 2509 (http://cplusplus.github.io/LWG/lwg-defects.html#2509). I plan to push it in a day or two if there are no comments. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22733 llvm-svn: 278310
* test/hard_link_count(): Fix test on darwinMatthias Braun2016-08-101-8/+17
| | | | | | | The hard link count that stat reports are different between normal hfs and the case sensitive variant. Accept both. llvm-svn: 278191
* Implement LCM and GCD for Library Fundamentals. Reviewed as ↵Marshall Clow2016-07-268-0/+389
| | | | | | https://reviews.llvm.org/D21343. llvm-svn: 276750
* Implement P0392r0. Integrate filesystem::path and string_view.Eric Fiselier2016-07-235-3/+116
| | | | llvm-svn: 276511
* [libcxx][filesystem] Remove setgid from parent before testing permissionsJonas Hahnfeld2016-07-181-0/+3
| | | | | | | | | man page for mkdir says: "If the parent directory has the set-group-ID bit set, then so will the newly created directory." Differential Revision: https://reviews.llvm.org/D22265 llvm-svn: 275760
* Fix std::experimental::optional tests. Patch from Casey Carter.Eric Fiselier2016-07-175-13/+9
| | | | llvm-svn: 275732
* Implement p0337r0. Delete operator= for polymorphic_allocator.Eric Fiselier2016-06-271-2/+2
| | | | llvm-svn: 273838
OpenPOWER on IntegriCloud