summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix bad locale test data when using the newest glibcEric Fiselier2016-09-041-0/+7
| | | | llvm-svn: 280608
* Implement C++17 std::sample.Eric Fiselier2016-08-281-1/+1
| | | | | | | | 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
* Implement LWG 2711. Constrain path members.Eric Fiselier2016-08-281-11/+13
| | | | llvm-svn: 279945
* Support allocators with explicit conversion constructors. Fixes bug #29000Marshall Clow2016-08-171-0/+25
| | | | llvm-svn: 278904
* Fix new ASAN failuresEric Fiselier2016-08-151-0/+1
| | | | llvm-svn: 278736
* Refactor test archetypes implementation.Eric Fiselier2016-08-112-99/+135
| | | | llvm-svn: 278319
* [libcxx] Add std::anyEric Fiselier2016-08-113-29/+519
| | | | | | | | | | | | | | | | | | | 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
* Fix copy/move constructor annotation for the uses-allocator test types.Eric Fiselier2016-08-081-9/+19
| | | | | | | Previously the copy/move constructors of the test types did not properly set the arg_id to T const& or T&& respectivly. llvm-svn: 277970
* Silence another occurrence of MSVC's suprious unused warning. Patch from ↵Eric Fiselier2016-08-031-1/+4
| | | | | | STL@microsoft.com llvm-svn: 277572
* Implement the std::pair parts of "Improving pair and tuple". Completes N4387.Eric Fiselier2016-07-251-0/+110
| | | | llvm-svn: 276605
* Implement P0040r3: Extending memory management toolsEric Fiselier2016-07-241-0/+27
| | | | llvm-svn: 276544
* Unbreak traits tests by handling differences between version macros in ↵Eric Fiselier2016-07-201-0/+8
| | | | | | clang/apple-clang. llvm-svn: 276200
* Add checkpoint diagnostics to help diagnose buildbot failures.Eric Fiselier2016-07-181-2/+7
| | | | llvm-svn: 275754
* Always use the allocator to construct/destruct elements of a deque/vector. ↵Marshall Clow2016-07-111-0/+78
| | | | | | Fixes PR#28412. Thanks to Jonathan Wakely for the report. llvm-svn: 275105
* Fix UB in uses_alloc_types.hppEric Fiselier2016-06-271-2/+2
| | | | llvm-svn: 273840
* Implement P0163r0. Add shared_ptr::weak_type.Eric Fiselier2016-06-271-1/+1
| | | | | | | | | | This patch adds the weak_type typedef in shared_ptr. It is available in C++17 and newer. This patch also updates the _LIBCPP_STD_VER and TEST_STD_VER macros to have the value of 16, since 2016 is the current year. llvm-svn: 273839
* Implement p0337r0. Delete operator= for polymorphic_allocator.Eric Fiselier2016-06-271-11/+11
| | | | llvm-svn: 273838
* Add [[noreturn]] attribute to throw_bad_alloc_helper().Eric Fiselier2016-06-262-3/+8
| | | | llvm-svn: 273819
* Use correct Clang feature names. I got them wrong in the previous commitEric Fiselier2016-06-221-2/+2
| | | | llvm-svn: 273384
* Support old GCC exception and rtti detection macrosEric Fiselier2016-06-221-2/+4
| | | | llvm-svn: 273383
* Add tests for RTTI/exceptions test macros.Eric Fiselier2016-06-225-0/+105
| | | | llvm-svn: 273382
* Fix exception/rtti detection in tests.Eric Fiselier2016-06-221-2/+2
| | | | | | | | | | So the macros TEST_HAS_NO_EXCEPTIONS and TEST_HAS_NO_RTTI were always getting defined because I spelt __cpp_exceptions and __cpp_rtti as __cxx_exceptions and __cxx_rtti. Tests incoming after this patch. llvm-svn: 273381
* Cleanup [list.modifiers] tests.Eric Fiselier2016-06-221-1/+34
| | | | llvm-svn: 273371
* Suppress stupid and incorrect MSVC warning. patch from STL@microsoft.comEric Fiselier2016-06-221-1/+5
| | | | llvm-svn: 273350
* Allow the libc++ build/source paths to contain symlinks.Eric Fiselier2016-06-211-0/+2
| | | | | | | | The filesystem tests were expecting the paths to the build/source directories did not contain any symlinks. This patch resolves those symlinks before running the test suite. llvm-svn: 273323
* Implement std::experimental::propagate_const from LFTS v2Jonathan Coe2016-06-191-0/+119
| | | | | | | | | | | | | Summary: An implementation of std::experimental::propagate_const from Library Fundamentals Technical Specification v2. No tests are provided for disallowed types like fancy pointers or function pointers as no code was written to handle these. Reviewers: EricWF, mclow.lists Differential Revision: http://reviews.llvm.org/D12486 llvm-svn: 273122
* Fix SleepFor(...) helper when a monotonic clock is not available.Eric Fiselier2016-06-181-3/+7
| | | | | | | | Single threaded builds often don't provide a monotonic clock, so we can't always provide a monotonic SleepFor(...) implementation. Hopefully this won't cause the builds to hang. llvm-svn: 273091
* Use monotonic clock in synthetic SleepFor test helperEric Fiselier2016-06-181-2/+2
| | | | llvm-svn: 273089
* Fix 3 bugs in filesystem tests and implementation.Eric Fiselier2016-06-181-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following bugs, all of which were discovered while testing a 32 bit build on a 64 bit machine. * path.itr/iterator.pass.cpp has undefined behavior. 'path::iterator' stashes the value of the element inside the iterator. This violates the BiDirIterator requirements but is allowed for path::iterator. However this means that using reverse_iterator<path::iterator> has undefined behavior because it assumes that 'Iter tmp = it; return *tmp' will not create a dangling reference. However it does, and this caused this particular test to fail. * path.native.obs/string_alloc.pass.cpp tested the SSO with a long string. On 32 bit builds std::wstring only has the SSO for strings of size 2. The test was using a string of size 4. * fs.op.space/space.pass.cpp had overflows while calculating the expected values. The fix here is to convert the statvfs data members to std::uintmax_t before multiplying them. The internal implementation already does this but the tests needed to do it as well. llvm-svn: 273078
* Get filesystem tests passing for single-threaded configurations.Eric Fiselier2016-06-171-0/+11
| | | | llvm-svn: 273054
* Add Filesystem TS -- CompleteEric Fiselier2016-06-178-0/+1517
| | | | | | | | | | | | | | 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
* [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
* Replace __cplusplus comparisons and dialect __has_feature checks with ↵Eric Fiselier2016-06-144-8/+10
| | | | | | | | | 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
* Fix warnings in tests.Eric Fiselier2016-06-141-1/+1
| | | | llvm-svn: 272629
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-016-17/+17
| | | | llvm-svn: 271435
* Fix bug in test allocator that incorrectly computed the allocation sizeEric Fiselier2016-05-301-3/+4
| | | | llvm-svn: 271195
* Add missing include to test_iterators.hEric Fiselier2016-05-271-0/+1
| | | | llvm-svn: 271074
* Remove C++11 feature macros in tests. Use TEST_STD_VER instead.Eric Fiselier2016-05-161-6/+0
| | | | llvm-svn: 269669
* Add <experimental/memory_resource>Eric Fiselier2016-05-073-0/+861
| | | | | | | | | | Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20007 llvm-svn: 268829
* Don't use std::__clz in 'test/support/hexfloat.h'.Eric Fiselier2016-05-031-4/+16
| | | | | | | | | | | std::__clz is a libc++ specific function so it can't be used in the test suite. This patch implements a dumb "count leading zeros" implementation within hexfloat itself. This patch also fixes UB since the output of `__builtin_clz(0)` is undefined according to the GCC docs. llvm-svn: 268354
* Fix or move various non-standard tests.Eric Fiselier2016-04-291-1/+1
| | | | | | | | | | | | This patch does the following: * Remove <__config> includes from some container tests. * Guards uses of std::launch::any in async tests because it's an extension. * Move "test/std/extensions" to "test/libcxx/extensions" * Moves various non-standard tests including those in "sequences/vector", "std/localization" and "utilities/meta". llvm-svn: 267981
* Fix possible test breakage for MinGWEric Fiselier2016-04-291-8/+9
| | | | llvm-svn: 267968
* Fix get_temp_file_name() to compile on Windows. Patch from STL@microsoft.comEric Fiselier2016-04-291-6/+8
| | | | llvm-svn: 267963
* Add a return value for nasty_mutex::operator&. Patch from STL@microsoft.comEric Fiselier2016-04-291-1/+1
| | | | llvm-svn: 267961
* Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macrosEric Fiselier2016-04-283-29/+19
| | | | llvm-svn: 267947
* Remove names of unreferenced parameters. Patch from STL@microsoft.comEric Fiselier2016-04-282-4/+4
| | | | llvm-svn: 267852
* Guard Clang and GCC specific pragmas. Patch from STL@microsoft.comEric Fiselier2016-04-281-0/+2
| | | | llvm-svn: 267836
* Fix some non-standard parts of our test suite. Reported by STLEric Fiselier2016-04-224-30/+34
| | | | llvm-svn: 267131
* Teach map/unordered_map how to optimize 'emplace(Key, T)'.Eric Fiselier2016-04-161-0/+5
| | | | | | | | | In cases where emplace is called with two arguments and the first one matches the key_type we can Key to check for duplicates before allocating. This patch expands on work done by dexonsmith@apple.com. llvm-svn: 266498
* Extract key to avoid preemptive mallocs in insert/emplace in associative ↵Eric Fiselier2016-04-151-0/+62
| | | | | | | | | | | | | | containers Summary: This patch applies Duncan's work on __hash_table to __tree. Reviewers: mclow.lists, dexonsmith Subscribers: dexonsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D18637 llvm-svn: 266491
OpenPOWER on IntegriCloud