Commit Graph

79 Commits

Author SHA1 Message Date
Marshall Clow
506f7fcee5 P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286884 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 20:41:17 +00:00
Stephan T. Lavavej
e619862dbf [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.
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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-04 20:26:59 +00:00
Marshall Clow
f333beee2c Implement another part of P0031; adding constexpr to move_iterator
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 15:30:26 +00:00
Marshall Clow
464abc8aee Adding a missing constexpr test for reverse_iterator operator[].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-20 14:57:34 +00:00
Marshall Clow
4414a6a911 Implement constexpr support for reverse_iterator. Reviewed as https://reviews.llvm.org/D25534
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 15:12:50 +00:00
Marshall Clow
8be2c5dd9e Add tests for LWG2544. We already implement this; just adding tests to make sure that we keep doing it.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 14:10:45 +00:00
Asiri Rathnayake
6e3bce5f6c [libcxx] Add missing c++98 xfail. NFC.
This is the only test failing in c++98 mode at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@281731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-16 14:32:19 +00:00
Marshall Clow
6efc20f541 Mark test as XFAIL for C++03, rather than providing a dummy pass.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280605 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-04 00:37:06 +00:00
Marshall Clow
02e94f8095 std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@278282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-10 20:04:46 +00:00
Eric Fiselier
c848cefa27 Fix ::reference typedef in insert iterators.
Since at least the C++11 standard insert iterators are specified
as having ::reference typedef void. Libc++ was not doing that.
This patch corrects the typedef.

This patch changes the std::iterator base class of insert_iterator,
front_insert_iterator and back_insert_iterator. This should not
be an ABI breaking change.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:40:50 +00:00
Eric Fiselier
8db06d71c2 Make instreambuf.iterator/types.pass.cpp more portable.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 04:31:09 +00:00
Eric Fiselier
22bff1afcc Move remaining _LIBCPP_VERSION tests into test/libcxx
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 02:23:22 +00:00
Eric Fiselier
d24c465bea Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER.
This is a huge cleanup that helps make the libc++ test suite more portable.
Patch from STL@microsoft.com. Thanks STL!


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272716 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:31:42 +00:00
Eric Fiselier
84acb1ec3f Remove trailing whitespace in test suite. Approved by Marshall Clow.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 21:35:39 +00:00
Asiri Rathnayake
a3eac518e6 [libcxx] Improve tests to use the UNSUPPORTED lit directive
Quite a few libcxx tests seem to follow the format:
 #if _LIBCPP_STD_VER > X
   // Do test.
 #else
   // Empty test.
 #endif
We should instead use the UNSUPPORTED lit directive to exclude the test on
earlier C++ standards. This gives us a more accurate number of test passes
for those standards and avoids unnecessary conflicts with other lit
directives on the same tests.

Reviewers: bcraig, ericwf, mclow.lists

Differential revision: http://reviews.llvm.org/D20730

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 08:57:35 +00:00
Eric Fiselier
a3388c6bb2 Test hijacking ADL for operator& in the stream iterator constructors.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269838 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:01:20 +00:00
Eric Fiselier
995f64c4ae Add test for r269789
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269812 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 19:52:32 +00:00
Eric Fiselier
a9ea11398d Void cast runtime-unused variables. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-02 19:15:48 +00:00
Marshall Clow
d7f1f971d1 Rename a few tests that had typos in their names. No functional change. Thanks to STL for the catch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-23 14:31:00 +00:00
Eric Fiselier
df46b78ce7 Fix LWG issue #2106: move_iterators returning prvalues
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 00:49:12 +00:00
Marshall Clow
dca800cd0f Implement LWG#680, which was missed lo these many moons ago, and was reported as bug #27259. As a drive-by fix, replace the hand-rolled equivalent to addressof in __wrap_iter with the real thing.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@265914 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 03:54:53 +00:00
Eric Fiselier
c8b24c6d54 Mark some test XFAIL for GCC 4.9 due to missing is_trivial* traits
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 04:59:57 +00:00
Marshall Clow
e9ef988b08 Implement LWG#2353: std::next is over-constrained
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252407 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 17:48:49 +00:00
Eric Fiselier
408369b7c9 Suppress clang warnings in some tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246399 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-30 22:04:20 +00:00
Marshall Clow
e9d030687d A few bits of N2994 didn't get fully implemented a long time ago. Thanks to STL@microsoft.com for the bug report
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@235134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-16 21:36:54 +00:00
Nico Weber
a7dcd3a3e1 [libcxx] Make __wrap_iter work with gcc.
he following snippet doesn't build when using gcc and libc++:

    #include <string>
    void f(const std::string& s) { s.begin(); }
    #include <vector>
    void AppendTo(const std::vector<char>& v) { v.begin(); }

The problem is that __wrap_iter has a private constructor. It lists vector<>
and basic_string<> as friends, but gcc seems to ignore this for vector<> for
some reason. Declaring vector before the friend declaration in __wrap_iter is
enough to work around this problem, so do that. With this patch, I'm able to
build chromium/android with libc++. Without it, two translation units fail to
build. (iosfwd already provides a forward declaration of basic_string.)

As far as I can tell, this is due to a gcc bug, which I filed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816.

Fixes PR22355.

http://reviews.llvm.org/D7201


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227226 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 19:27:39 +00:00
Marshall Clow
02f6369a6b Cleaning up the test suite; remove some includes of non-standard file <__config>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226411 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-18 19:05:51 +00:00
Marshall Clow
141dd0c245 One more #include request in the test suite from Walter Brown
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225609 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 18:07:06 +00:00
Eric Fiselier
a90c6dd460 Move test into test/std subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20 01:40:03 +00:00