summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a problem with reference_wrapper in C++03 that was causing counting ↵Marshall Clow2014-08-041-0/+18
| | | | | | predicates to fail. Add a test to make sure it works. However, most of the reference_wrapper tests still fail in C++03 mode, due to a lack of decltype. No change there. llvm-svn: 214760
* Add locales to available_features for tests.Dan Albert2014-08-0458-0/+233
| | | | | | | | | | | | | | | | | | Linux has a lot of failures caused by not having support for certain locales. Since these come out as a lot of noise in the test results, have lit.cfg detect the presence of the various locales used in the tests and add them to config.available_features as locale.LOCALE_NAME. This patch also adds REQUIRES: locale.REQUIRED_LOCALE to every test that I saw failing in this manner. We probably need to add more for all the tests requiring en_US.UTF-8, but we can do that on an as-needed basis. One thing that concerns me is how many tests get skipped because of missing locales (especially in regex/). We should make a point of splitting up any tests that test default behavior _and_ behavior under a given locale so that we aren't losing coverage for default behavior. llvm-svn: 214753
* Fix PR#202520 - predicate called too many times in list::remove_if. Add ↵Marshall Clow2014-08-044-19/+75
| | | | | | tests for list, forward_list, and the std::remove_if algorithm llvm-svn: 214736
* Change lit.cfg to allow whitespace before commentsEric Fiselier2014-07-311-1/+1
| | | | llvm-svn: 214454
* Add test cases for creating atomic types for trivially copyable types.Marshall Clow2014-07-312-0/+141
| | | | llvm-svn: 214406
* Fix numeric_limits<XXX>::is_modulo for signed arithmetic types. We were ↵Marshall Clow2014-07-311-8/+8
| | | | | | reporting true, for all arithmetic types, which is incorrect. Fix the tests which were wrong, too. This fixes PR#20158. llvm-svn: 214371
* Base regex code on char_class_type.Dan Albert2014-07-291-1/+3
| | | | | | | | | | | | __get_classname() and __bracket_expression were assuming that char_class_type was ctype_base::mask rather than using regex_traits<_CharT>::char_class_type. This change allows char_class_type to be defined to something other than ctype_base::mask so that the implementation will still work for platforms with an 8-bit ctype mask (such as Android and OpenBSD). llvm-svn: 214201
* [libcxx] expose experimental::erased_type for all standard versions.Eric Fiselier2014-07-242-9/+5
| | | | | | | | | | | | | | Summary: The polymorphic allocator implementation would greatly benefit by defining virtual functions in the dynlib instead of inline. In order to do that some types are going to have to be available outside of c++1y. This is the first step. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4554 llvm-svn: 213889
* D4451: Fix copy/move issues casude by __tuple_leafs's converting constructorEric Fiselier2014-07-244-2/+73
| | | | llvm-svn: 213888
* test commitEric Fiselier2014-07-241-0/+1
| | | | llvm-svn: 213887
* Fix std::make_heap's worst case time complexityDavid Majnemer2014-07-221-1/+22
| | | | | | | | | | | | | | | | | std::make_heap is currently implemented by iteratively applying a siftup-type algorithm. Since sift-up is O(ln n), this gives std::make_heap a worst case time complexity of O(n ln n). The C++ standard mandates that std::make_heap make no more than O(3n) comparisons, this makes our std::make_heap out of spec. Fix this by introducing an implementation of __sift_down and switch std::make_heap to create the heap using it. This gives std::make_heap linear time complexity in the worst case. This fixes PR20161. llvm-svn: 213615
* Fix bug #20335 - memory leak when move-constructing a string with unequal ↵Marshall Clow2014-07-171-0/+10
| | | | | | allocator. Thanks to Thomas Koeppe for the report llvm-svn: 213269
* [libcxx] Add <experimental/utility> header for LFTS. Eric Fiselier2014-07-174-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS. `<experimental/utility>` only contains `class erased_type`. This patch also updates the documentation to list the `erased_type` class as "initial implementation complete". Test Plan: Three test cases where added: 1. Test that `_LIBCPP_VERSION` is defined. 2. Test that `<utility>` has been included. 3. Test that `erased_type` is in the correct namespace and is constexpr default constructible. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4510 llvm-svn: 213226
* Test commit: Reverting whitespace changesEric Fiselier2014-07-171-1/+0
| | | | llvm-svn: 213223
* Test commit: whitespace changeEric Fiselier2014-07-171-0/+1
| | | | llvm-svn: 213222
* Correctly implement LWG 2049; std::is_destructible.Marshall Clow2014-07-164-13/+75
| | | | llvm-svn: 213163
* Fix warning in test - missing exception specifier for overload of operator newMarshall Clow2014-07-101-1/+1
| | | | llvm-svn: 212723
* Add a reset method to the counting predicates in the test suiteMarshall Clow2014-07-091-1/+3
| | | | llvm-svn: 212651
* string_view enhancements. Move to the correct namespace. Better constexpr ↵Marshall Clow2014-07-081-1/+1
| | | | | | support (thanks to Richard for the suggestions). Update the tests to match this. Add <experimental/__config for experimental macros/etc to live. llvm-svn: 212569
* Fix some failing tests for the standard containers. The tests were failing ↵Marshall Clow2014-07-0812-111/+135
| | | | | | in 32-bit mode because they assumed that std::size_type and make_unsigned<ptrdiff_t>::type were always the same type. No change to libc++, just the tests. llvm-svn: 212538
* Minor cleanup for string_view; mostly from suggestions by Richard Smith. ↵Marshall Clow2014-07-028-27/+27
| | | | | | Also, make the tests pass under c++03 llvm-svn: 212185
* Fix libc++ bug #20039: 'Constructing std::function from empty compatible ↵Marshall Clow2014-06-302-0/+36
| | | | | | std::function results in half-empty state' Thanks to Agustin Berge for the report, and for his and Eric Fiselier's work on a fix. llvm-svn: 212070
* Add checking for the complexity guarantees in the standardMarshall Clow2014-06-301-0/+16
| | | | llvm-svn: 212017
* Implement string_view from the library fundamentals TS (n4023). Also works ↵Marshall Clow2014-06-1179-0/+16095
| | | | | | in C++11 and 03, with reduced functionality (mostly in the area of constexpr) llvm-svn: 210659
* Mark assign to be constepr only in c++14; can't have constexpr fns that ↵Marshall Clow2014-06-101-1/+1
| | | | | | return void in C++11 llvm-svn: 210562
* A bunch of the char.traits tests were using unicode literals. #ifdef those ↵Marshall Clow2014-06-1018-0/+36
| | | | | | bits out on c++03, since it doesn't support u"" and U "" style strings. llvm-svn: 210560
* Testing infastructure: A template for char_traits where all the functions ↵Marshall Clow2014-06-062-0/+185
| | | | | | are constexpr, and a comparison predicate which counts how many times it's been called. llvm-svn: 210381
* Handle partial nanosleeps in this_thread::sleep_forDavid Majnemer2014-06-041-0/+20
| | | | | | | | | | Signals may result in nanosleep returning with only some of the requested sleeping performed. Utilize nanosleep's "time-remaining" out parameter to continue sleeping when this occurs. llvm-svn: 210210
* Make meta.trans.other/aligned_storage.pass.cpp pass on arm.Nico Weber2014-06-041-3/+11
| | | | | | | The maximum alignment on arm is 8, not 16 like on x86. Use alignof(max_align_t) to make the test work in both cases. llvm-svn: 210195
* [libc++] Don't return uninitialized data from random_device::operator()David Majnemer2014-06-031-2/+14
| | | | | | | | | | Make sure we appropriately retry calls to read if the return result is less than what we asked for. Additionally, check and handle IO errors: EINTR results in the read operation getting restarted; other errors turn into exceptions. llvm-svn: 210061
* [libc++] random_device fails if open returns zeroDavid Majnemer2014-06-031-0/+11
| | | | | | | | | | | | | random_device::random_device(const string&) wrongly assumes that open can only validly return a file descriptor greater than zero. This results in random_device believing that it didn't successfully open the device causing it to throw in it's constructor, this ends up leaking a file descriptor. The fix is simple, don't error on file descriptors which are zero. llvm-svn: 210060
* Remove unused code in a libc++ test.Nico Weber2014-06-021-17/+0
| | | | | | | | | | | Other tests in this directory use this type, so it's probably copypasta from there. (test_buf only forwards to the superclass in all tests where it's used though, so I wonder if it can be replaced with just using filebuf / wfilebuf everywhere?) llvm-svn: 210019
* Fix XFAIL condition from r208840Justin Bogner2014-05-311-3/+3
| | | | | | | The XFAILs in r208840 were too general. They were meant to only apply to testing when use_system_lib was set. llvm-svn: 209972
* fix typoNico Weber2014-05-292-2/+2
| | | | llvm-svn: 209819
* Linux: Correctly identify valid error codesDavid Majnemer2014-05-291-2/+2
| | | | | | | | | | | | | | [syserr.errcat.objects]p4 specifies that system_category().default_error_condition(ev) map to error_condition(posv, generic_category()) if ev could map to a POSIX errno. Linux reserves up to and including 4095 for errno values, use this as a bound. This fixes syserr.errcat.objects/system_category.pass.cpp on Linux. llvm-svn: 209795
* Fix a problem exposed by r208825, which caused bind (and other bits of ↵Marshall Clow2014-05-291-0/+23
| | | | | | libc++) to stop working. And tests llvm-svn: 209785
* Fix bug 19840, where some tests were not testing what we wanted. Thanks to ↵Marshall Clow2014-05-232-12/+12
| | | | | | Eric for the bug report llvm-svn: 209520
* Fix Bug 19678 - libc++ does not correctly handle the regex: '[^\0]*'Marshall Clow2014-05-211-0/+12
| | | | llvm-svn: 209307
* Fix bug 19740; round-tripping a pointer through a stream doesn't workMarshall Clow2014-05-211-0/+18
| | | | llvm-svn: 209305
* Fix typo 'fourty' in testsAlp Toker2014-05-1520-87/+87
| | | | llvm-svn: 208870
* Fix typosAlp Toker2014-05-153-8/+8
| | | | llvm-svn: 208869
* Work around ABI differences due to LWG 2056 in testsJustin Bogner2014-05-152-1/+16
| | | | | | | | | When testing against the system library, there is a relatively minor ABI breakage that the std::future_errc values have been changed to avoid using zero. Update the tests that rely on the values being consistent. llvm-svn: 208840
* Remove XFAIL from a number of tests that aren't expected to failJustin Bogner2014-05-156-18/+0
| | | | | | | | These tests haven't been failing on darwin11 or 12 since r189610 when pr17027 was fixed, but they've been keeping the libc++ bot red by XPASSing since then. llvm-svn: 208831
* Add Address Sanitizer support to std::vectorMarshall Clow2014-05-0839-0/+413
| | | | llvm-svn: 208319
* Fix PR 19663. Some calls to find(vector<bool>) were returning iterators that ↵Marshall Clow2014-05-061-0/+2
| | | | | | were subtly invalid (didn't compare equal). Thanks to Erik Verbruggen for the report (and diagnosis) llvm-svn: 208096
* Fix bug #18350. Add tests for tuples of all the smart pointers (except auto_ptr)Marshall Clow2014-04-261-0/+35
| | | | llvm-svn: 207307
* Added some tests for equal elements in min_element and max_element. Bug ↵Marshall Clow2014-04-252-0/+36
| | | | | | #19547 was invalid, but we weren't testing that case llvm-svn: 207232
* Default the copy and move constructors for __tuple_leaf. This fixes bugs ↵Marshall Clow2014-04-211-0/+35
| | | | | | 18853 and 19118. Add a test case for that. llvm-svn: 206829
* Add more tests for std::ws as pointed out by bug #19497Marshall Clow2014-04-211-0/+20
| | | | llvm-svn: 206770
* Bug #19473. If you pass an allocator to std::function, we should use that ↵Marshall Clow2014-04-182-0/+69
| | | | | | allocator, not construct one from scratch. Add a test to make sure llvm-svn: 206623
OpenPOWER on IntegriCloud