[libcxx] r203479 - Added tests to the sequence containers for for LWG Issue #2263. Comparing iterators and allocator pointers with different const-character. No changes to libc++
Marshall Clow
mclow.lists at gmail.com
Mon Mar 10 11:54:56 PDT 2014
Author: marshall
Date: Mon Mar 10 13:54:56 2014
New Revision: 203479
URL: http://llvm.org/viewvc/llvm-project?rev=203479&view=rev
Log:
Added tests to the sequence containers for for LWG Issue #2263. Comparing iterators and allocator pointers with different const-character. No changes to libc++
Modified:
libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp
libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp
libcxx/trunk/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp
libcxx/trunk/test/containers/sequences/list/iterators.pass.cpp
libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp
libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp
Modified: libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp?rev=203479&r1=203478&r2=203479&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp Mon Mar 10 13:54:56 2014
@@ -72,10 +72,23 @@ int main()
C::const_iterator cii{};
assert ( ii1 == ii2 );
assert ( ii1 == ii4 );
- assert ( ii1 == cii );
- assert ( !(ii1 != ii2 ));
- assert ( !(ii1 != cii ));
+ assert (!(ii1 != ii2 ));
+
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
+ assert (!(ii1 < cii ));
+ assert (!(cii < ii1 ));
+ assert ( (ii1 <= cii ));
+ assert ( (cii <= ii1 ));
+ assert (!(ii1 > cii ));
+ assert (!(cii > ii1 ));
+ assert ( (ii1 >= cii ));
+ assert ( (cii >= ii1 ));
+ assert (cii - ii1 == 0);
+ assert (ii1 - cii == 0);
C c;
assert ( c.begin() == std::begin(c));
Modified: libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp?rev=203479&r1=203478&r2=203479&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp Mon Mar 10 13:54:56 2014
@@ -51,11 +51,24 @@ int main()
std::deque<int>::const_iterator cii{};
assert ( ii1 == ii2 );
assert ( ii1 == ii4 );
- assert ( ii1 == cii );
- assert ( !(ii1 != ii2 ));
- assert ( !(ii1 != cii ));
+ assert (!(ii1 != ii2 ));
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
+ assert (!(ii1 < cii ));
+ assert (!(cii < ii1 ));
+ assert ( (ii1 <= cii ));
+ assert ( (cii <= ii1 ));
+ assert (!(ii1 > cii ));
+ assert (!(cii > ii1 ));
+ assert ( (ii1 >= cii ));
+ assert ( (cii >= ii1 ));
+ assert (cii - ii1 == 0);
+ assert (ii1 - cii == 0);
+
// std::deque<int> c;
// assert ( ii1 != c.cbegin());
// assert ( cii != c.begin());
Modified: libcxx/trunk/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp?rev=203479&r1=203478&r2=203479&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp Mon Mar 10 13:54:56 2014
@@ -127,10 +127,13 @@ int main()
std::forward_list<int>::const_iterator cii{};
assert ( ii1 == ii2 );
assert ( ii1 == ii4 );
- assert ( ii1 == cii );
+
+ assert (!(ii1 != ii2 ));
- assert ( !(ii1 != ii2 ));
- assert ( !(ii1 != cii ));
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
// std::forward_list<int> c;
// assert ( ii1 != c.cbegin());
Modified: libcxx/trunk/test/containers/sequences/list/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/sequences/list/iterators.pass.cpp?rev=203479&r1=203478&r2=203479&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/list/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/list/iterators.pass.cpp Mon Mar 10 13:54:56 2014
@@ -143,10 +143,13 @@ int main()
std::list<int>::const_iterator cii{};
assert ( ii1 == ii2 );
assert ( ii1 == ii4 );
- assert ( ii1 == cii );
- assert ( !(ii1 != ii2 ));
- assert ( !(ii1 != cii ));
+ assert (!(ii1 != ii2 ));
+
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
assert ( ii1 != c.cbegin());
assert ( cii != c.begin());
Modified: libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp?rev=203479&r1=203478&r2=203479&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp Mon Mar 10 13:54:56 2014
@@ -101,9 +101,23 @@ int main()
std::vector<bool>::const_iterator cii{};
assert ( ii1 == ii2 );
assert ( ii1 == ii4 );
- assert ( ii1 == cii );
- assert ( !(ii1 != ii2 ));
- assert ( !(ii1 != cii ));
+
+ assert (!(ii1 != ii2 ));
+
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
+ assert (!(ii1 < cii ));
+ assert (!(cii < ii1 ));
+ assert ( (ii1 <= cii ));
+ assert ( (cii <= ii1 ));
+ assert (!(ii1 > cii ));
+ assert (!(cii > ii1 ));
+ assert ( (ii1 >= cii ));
+ assert ( (cii >= ii1 ));
+ assert (cii - ii1 == 0);
+ assert (ii1 - cii == 0);
}
#endif
}
Modified: libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp?rev=203479&r1=203478&r2=203479&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp Mon Mar 10 13:54:56 2014
@@ -143,9 +143,23 @@ int main()
C::const_iterator cii{};
assert ( ii1 == ii2 );
assert ( ii1 == ii4 );
- assert ( ii1 == cii );
- assert ( !(ii1 != ii2 ));
- assert ( !(ii1 != cii ));
+
+ assert (!(ii1 != ii2 ));
+
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
+ assert (!(ii1 < cii ));
+ assert (!(cii < ii1 ));
+ assert ( (ii1 <= cii ));
+ assert ( (cii <= ii1 ));
+ assert (!(ii1 > cii ));
+ assert (!(cii > ii1 ));
+ assert ( (ii1 >= cii ));
+ assert ( (cii >= ii1 ));
+ assert (cii - ii1 == 0);
+ assert (ii1 - cii == 0);
}
#endif
}
More information about the cfe-commits
mailing list