summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
* Implement LWG#2353: std::next is over-constrainedMarshall Clow2015-11-071-0/+4
| | | | llvm-svn: 252407
* More of P0006R0: type traits variable aliases for C++17.Marshall Clow2015-11-0726-5/+234
| | | | llvm-svn: 252406
* Implement P0092R1 for C++1zMarshall Clow2015-11-0514-0/+589
| | | | llvm-svn: 252195
* Remove undefined behavior from some tests. Same pattern as the ↵Marshall Clow2015-11-022-10/+16
| | | | | | unitialized_copy tests llvm-svn: 251804
* Remove undefined behavior from some tests. Thanks to Walter Brown for the ↵Marshall Clow2015-11-022-10/+18
| | | | | | heads-up. llvm-svn: 251802
* Improve the tests for 'is_literal_type'Marshall Clow2015-11-011-18/+62
| | | | llvm-svn: 251767
* Implement the first part of P0006R0: Adopt Type Traits Variable Templates ↵Marshall Clow2015-11-0134-0/+2198
| | | | | | for C++17. Significantly augment the existing tests. llvm-svn: 251766
* Implement P0004R1 'Remove Deprecated iostreams aliases'Marshall Clow2015-10-295-0/+25
| | | | llvm-svn: 251618
* Fix LWG#2489: mem_fn() should be noexceptMarshall Clow2015-10-251-0/+3
| | | | llvm-svn: 251257
* Add the tests for the last commitMarshall Clow2015-10-252-0/+144
| | | | llvm-svn: 251254
* Add a test for LWG#2466: allocator_traits::max_size() default behavior is ↵Marshall Clow2015-10-251-2/+2
| | | | | | incorrect llvm-svn: 251252
* Add a test for LWG#2462: std::ios_base::failure is overspecifiedMarshall Clow2015-10-251-0/+3
| | | | llvm-svn: 251250
* Fix LWG#2127: Move-construction with raw_storage_iterator.Marshall Clow2015-10-251-4/+23
| | | | llvm-svn: 251247
* Fix LWG#2244: basic_istream::seekgMarshall Clow2015-10-251-0/+9
| | | | llvm-svn: 251246
* Set LC_COLLATE rather than LANG to override collation.Tim Northover2015-10-231-1/+1
| | | | | | | On a system with LC_COLLATE=C, this takes precedence over a non-C LANG the test tries to impose and the test fails. llvm-svn: 251131
* Fix use of libc++ <foo.h> headers from within an 'extern "C"' context in C++98.Richard Smith2015-10-131-0/+43
| | | | | | Previously, this resulted in us declaring a template for static_assert emulation within the 'extern "C"' context, which is ill-formed. llvm-svn: 250247
* Revert r249931 - Remove same_decls.pass.cpp because it fails on OS X and in ↵Eric Fiselier2015-10-101-517/+0
| | | | | | C++03 mode. llvm-svn: 249938
* Get some of wchar_h.pass.cpp working on apple.Eric Fiselier2015-10-101-10/+16
| | | | llvm-svn: 249936
* Unrevert r249889, and XFAIL the test for Darwin, where the libc apparently ↵Richard Smith2015-10-101-11/+24
| | | | | | doesn't provide a correct overload set for some functions. llvm-svn: 249932
* Add a test that we declare the right set of C library function signatures in ::Richard Smith2015-10-101-0/+517
| | | | | | and std::, and that the names in :: and std:: are declaring the same entity. llvm-svn: 249931
* Revert r249889 due to bot failure.Manman Ren2015-10-101-18/+11
| | | | llvm-svn: 249926
* Split <wchar.h> out of <cwchar>.Richard Smith2015-10-091-11/+18
| | | | llvm-svn: 249889
* Split <stdlib.h> out of <cstdlib>.Richard Smith2015-10-091-0/+24
| | | | llvm-svn: 249800
* Split <stdio.h> out of <cstdio>.Richard Smith2015-10-091-0/+20
| | | | | | As with <stddef.h>, skip our custom header if __need_FILE or __need___FILE is defined. llvm-svn: 249798
* Fix test failure in C++98 mode due to imperfect static_assert emulation.Richard Smith2015-10-081-1/+1
| | | | llvm-svn: 249780
* Split <stddef.h> out of <cstddef>.Richard Smith2015-10-081-0/+22
| | | | | | | | | | | | | | There are a bunch of macros (__need_size_t etc) that request just one piece of <stddef.h>; if any one of these is defined, we just directly include the underlying header. Note that <stddef.h> provides a ::nullptr_t. We don't want that available to includers of <cstddef>, so instead of following the usual pattern where <cfoo> includes <foo.h> then pulls things from :: into std:: with using-declarations, we implement <stddef.h> and <cstddef> separately; both include <__nullptr> for the definition of std::nullptr_t. llvm-svn: 249761
* Split <setjmp.h> out of <csetjmp>.Richard Smith2015-10-081-0/+4
| | | | llvm-svn: 249743
* Split <math.h> out of <cmath>.Richard Smith2015-10-083-22/+884
| | | | llvm-svn: 249742
* Split <inttypes.h> out of <cinttypes>.Richard Smith2015-10-081-2/+287
| | | | llvm-svn: 249741
* Split <ctype.h> out of <cctype>.Richard Smith2015-10-081-14/+14
| | | | llvm-svn: 249738
* While researching LWG#2244, I noticed we weren't testing that eofbit was ↵Marshall Clow2015-10-071-0/+9
| | | | | | being cleared. Now we are llvm-svn: 249593
* Fixed a possible overflow in a test of allocator::max_size().Marshall Clow2015-10-051-2/+2
| | | | llvm-svn: 249349
* Implement LWG#2063, and update the issues links to point to the github ↵Marshall Clow2015-10-051-0/+6
| | | | | | generated pages llvm-svn: 249325
* Attempt to prevent flaky thread.mutex tests by once again increasing timing ↵Eric Fiselier2015-10-0112-28/+32
| | | | | | tolerances llvm-svn: 248993
* Manually suppress -Wnonnull when it occurs in an unevaluated contextEric Fiselier2015-10-012-0/+12
| | | | llvm-svn: 248989
* Suppress array initialization warnings in std::experimental::apply testsEric Fiselier2015-10-0119-23/+59
| | | | llvm-svn: 248987
* The test I cnecked in to check the fix for PR#24890 failed (as expected) w/o ↵Marshall Clow2015-09-221-0/+1
| | | | | | the fix, but for the wrong reason. Now it fails for the right reason. llvm-svn: 248307
* Check in the test for PR#24890 that I forgot in previous commitMarshall Clow2015-09-221-0/+18
| | | | llvm-svn: 248305
* Suppress some warnings in the tests that snuck in. That 'tmpnam' is ↵Marshall Clow2015-09-152-1/+2
| | | | | | deprecated doesn't change the fact that we have to test it. llvm-svn: 247704
* Change initialization of mbstate_t objects in tests from '= {0}' to '= {}', ↵Marshall Clow2015-09-1519-21/+21
| | | | | | which does the same thing, w/o having clang and gcc warn with -Wall. llvm-svn: 247695
* Implementation of Boyer-Moore and Boyer-Moore-Horspool searchers for the LFTS.Marshall Clow2015-09-089-0/+1035
| | | | llvm-svn: 247036
* make common_type SFINAE-friendly and support void. Patch from Agustin Berge.Eric Fiselier2015-09-081-4/+54
| | | | | | | This patch also fixes PR22135. (https://llvm.org/bugs/show_bug.cgi?id=22135) See the review for more information: http://reviews.llvm.org/D6964 llvm-svn: 246977
* Suppress clang warnings in some testsEric Fiselier2015-08-307-28/+44
| | | | llvm-svn: 246399
* Remove task to get C++03 tests passing from TODO.txtEric Fiselier2015-08-301-1/+1
| | | | llvm-svn: 246392
* Finally get the test suite passing in C++03!!Eric Fiselier2015-08-283-2/+10
| | | | | | | | | After months of work there are only 4 tests still failing in C++03. This patch fixes those tests. All of the libc++ builders should be green. llvm-svn: 246275
* Remove empty file that arcanist createdEric Fiselier2015-08-281-0/+0
| | | | llvm-svn: 246273
* [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03Eric Fiselier2015-08-2838-603/+334
| | | | | | | | | | | | | | | | | | | | Summary: This patch marks *most* tests for `std::promise`, `std::future` and `std::shared_future` as unsupported in C++03. These tests fail in C++03 mode because they attempt to copy a `std::future` even though it is a `MoveOnly` type. AFAIK the missing move-semantics in `std::future` is the only reason these tests fail but without move semantics these classes are useless. For example even though `std::promise::set_value` and `std::promise::set_exception(...)` work in C++03 `std::promise` is still useless because we cannot call `std::promise::get_future(...)`. It might be possible to hack `std::move(...)` like we do for `std::unique_ptr` to make the move semantics work but I don't think it is worth the effort. Instead I think we should leave the `<future>` header as-is and mark the failing tests as `UNSUPPORTED`. I don't believe there are any users of `std::future` or `std::promise` in C++03 because they are so unusable. Therefore I am not concerned about losing test coverage and possibly breaking users. However because there are still parts of `<future>` that work in C++03 it would be wrong to `#ifdef` out the entire header. @mclow.lists Should we take further steps to prevent the use of `std::promise`, `std::future` and `std::shared_future` in C++03? Note: This patch also cleans up the tests and converts them to use `support/test_allocator.h` instead of a duplicate class in `test/std/futures/test_allocator.h`. Reviewers: mclow.lists Subscribers: vsk, mclow.lists, cfe-commits Differential Revision: http://reviews.llvm.org/D12135 llvm-svn: 246271
* [libcxx] Rewrite C++03 __invoke.Eric Fiselier2015-08-262-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch rewrites the C++03 `__invoke` and related meta-programming. There are a number of major changes. `__invoke` in C++03 now has a fallback overload for when the invoke expression is ill-formed (similar to C++11). This means that the `__invoke_return` traits will return `__nat` when `__invoke(...)` is ill formed. This would previously cause a compile error. Bullets 1-4 of `__invoke` have been rewritten. In the old version `__invoke` had 32 overloads for bullets 1 and 2, one for each possible cv-qualified function signature with arities 0-3. 64 overloads would be needed to support member functions with varargs. Currently these overloads were fundamentally broken. An example overload looked like: ``` template <class Rp, class Tp, class T1, class A0> Rp __invoke(Rp (Tp::*pm)(A0) const, T1&, A0&) ``` Because `A0` appeared in two different deducible contexts it would have to deduce to be an exact match or the overload would be rejected. This is made even worse because `A0` appears without a reference qualifier in the member function signature and with a reference qualifier as an `__invoke` parameter. This means that only member functions that took all of their arguments by value could be matched. One possible fix would be to make the second occurrence of `A0` appear in a non-deducible context. This way any type convertible to `A0` could be passed as the first parameter. The benefit of this approach is that the signature of the member function enforces the arity and types taken by the `__invoke` signature it generates. However nothing in the `INVOKE` specification requires this behavior. My solution is to use a `__invoke_enable_if<PM_Type, Tp>` metafunction to selectively enable the `__invoke` overloads for bullets 1, 2, 3 and 4. It uses `__member_function_traits` to inspect and extract the return type and class type of the pointer to member. Using `__member_function_traits` to inspect `PM_Type` also allows us to reduce the number of `__invoke` overloads from 32 to 8 and add varargs support at the same time. Because `__invoke_enable_if` knows the exact return type of `__invoke` for bullets 1-4 we no longer need to use `decltype(__invoke(...))` to compute the return type in the `__invoke_return*` traits. This will reduce the problems caused by `#define decltype(X) __typeof__(X)` in C++03. Tests for this change have already been committed. All tests in `test/std/utilities/function.objects` now pass in C++03, previously there were 20 failures. Reviewers: K-ballo, howard.hinnant, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11553 llvm-svn: 246068
* Refactor flaky shared_mutex testsEric Fiselier2015-08-264-22/+39
| | | | llvm-svn: 246055
* Remove XFAIL in test. The bug causing it has been fixed.Eric Fiselier2015-08-261-5/+0
| | | | llvm-svn: 246022
OpenPOWER on IntegriCloud