[libcxx] r188019 - N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests
Marshall Clow
mclow.lists at gmail.com
Thu Aug 8 14:52:50 PDT 2013
Author: marshall
Date: Thu Aug 8 16:52:50 2013
New Revision: 188019
URL: http://llvm.org/viewvc/llvm-project?rev=188019&view=rev
Log:
N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests
Modified:
libcxx/trunk/include/__tree
libcxx/trunk/test/containers/associative/map/map.access/iterator.pass.cpp
libcxx/trunk/test/containers/associative/multimap/iterator.pass.cpp
libcxx/trunk/test/containers/associative/multiset/iterator.pass.cpp
libcxx/trunk/test/containers/associative/set/iterator.pass.cpp
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/vector.bool/iterators.pass.cpp
libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp
libcxx/trunk/test/containers/unord/unord.map/iterators.pass.cpp
libcxx/trunk/test/containers/unord/unord.multimap/iterators.pass.cpp
libcxx/trunk/test/containers/unord/unord.multiset/iterators.pass.cpp
libcxx/trunk/test/containers/unord/unord.set/iterators.pass.cpp
libcxx/trunk/test/strings/basic.string/string.iterators/iterators.pass.cpp
Modified: libcxx/trunk/include/__tree
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__tree?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/include/__tree (original)
+++ libcxx/trunk/include/__tree Thu Aug 8 16:52:50 2013
@@ -641,7 +641,11 @@ public:
#endif
pointer;
- _LIBCPP_INLINE_VISIBILITY __tree_iterator() _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY __tree_iterator() _NOEXCEPT
+#if _LIBCPP_STD_VER > 11
+ : __ptr_(nullptr)
+#endif
+ {}
_LIBCPP_INLINE_VISIBILITY reference operator*() const {return __ptr_->__value_;}
_LIBCPP_INLINE_VISIBILITY pointer operator->() const
@@ -712,7 +716,12 @@ public:
#endif
pointer;
- _LIBCPP_INLINE_VISIBILITY __tree_const_iterator() {}
+ _LIBCPP_INLINE_VISIBILITY __tree_const_iterator() _NOEXCEPT
+#if _LIBCPP_STD_VER > 11
+ : __ptr_(nullptr)
+#endif
+ {}
+
private:
typedef typename remove_const<__node>::type __non_const_node;
typedef typename pointer_traits<__node_pointer>::template
Modified: libcxx/trunk/test/containers/associative/map/map.access/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/associative/map/map.access/iterator.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/associative/map/map.access/iterator.pass.cpp (original)
+++ libcxx/trunk/test/containers/associative/map/map.access/iterator.pass.cpp Thu Aug 8 16:52:50 2013
@@ -207,4 +207,18 @@ int main()
}
}
#endif
+#if _LIBCPP_STD_VER > 11
+ { // N3644 testing
+ typedef std::map<int, double> C;
+ C::iterator ii1{}, ii2{};
+ C::iterator ii4 = ii1;
+ C::const_iterator cii{};
+ assert ( ii1 == ii2 );
+ assert ( ii1 == ii4 );
+ assert ( ii1 == cii );
+
+ assert ( !(ii1 != ii2 ));
+ assert ( !(ii1 != cii ));
+ }
+#endif
}
Modified: libcxx/trunk/test/containers/associative/multimap/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/associative/multimap/iterator.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/associative/multimap/iterator.pass.cpp (original)
+++ libcxx/trunk/test/containers/associative/multimap/iterator.pass.cpp Thu Aug 8 16:52:50 2013
@@ -211,4 +211,18 @@ int main()
}
}
#endif
+#if _LIBCPP_STD_VER > 11
+ { // N3644 testing
+ typedef std::multimap<int, double> C;
+ C::iterator ii1{}, ii2{};
+ C::iterator ii4 = ii1;
+ C::const_iterator cii{};
+ assert ( ii1 == ii2 );
+ assert ( ii1 == ii4 );
+ assert ( ii1 == cii );
+
+ assert ( !(ii1 != ii2 ));
+ assert ( !(ii1 != cii ));
+ }
+#endif
}
Modified: libcxx/trunk/test/containers/associative/multiset/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/associative/multiset/iterator.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/associative/multiset/iterator.pass.cpp (original)
+++ libcxx/trunk/test/containers/associative/multiset/iterator.pass.cpp Thu Aug 8 16:52:50 2013
@@ -195,4 +195,18 @@ int main()
assert(*i == j);
}
#endif
+#if _LIBCPP_STD_VER > 11
+ { // N3644 testing
+ typedef std::multiset<int> C;
+ C::iterator ii1{}, ii2{};
+ C::iterator ii4 = ii1;
+ C::const_iterator cii{};
+ assert ( ii1 == ii2 );
+ assert ( ii1 == ii4 );
+ assert ( ii1 == cii );
+
+ assert ( !(ii1 != ii2 ));
+ assert ( !(ii1 != cii ));
+ }
+#endif
}
Modified: libcxx/trunk/test/containers/associative/set/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/associative/set/iterator.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/associative/set/iterator.pass.cpp (original)
+++ libcxx/trunk/test/containers/associative/set/iterator.pass.cpp Thu Aug 8 16:52:50 2013
@@ -191,4 +191,18 @@ int main()
assert(*i == j);
}
#endif
+#if _LIBCPP_STD_VER > 11
+ { // N3644 testing
+ typedef std::set<int> C;
+ C::iterator ii1{}, ii2{};
+ C::iterator ii4 = ii1;
+ C::const_iterator cii{};
+ assert ( ii1 == ii2 );
+ assert ( ii1 == ii4 );
+ assert ( ii1 == cii );
+
+ assert ( !(ii1 != ii2 ));
+ assert ( !(ii1 != cii ));
+ }
+#endif
}
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=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/array/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -37,7 +37,7 @@ int main()
}
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
{
typedef std::array<int, 5> C;
C::iterator ii1{}, ii2{};
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=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/deque/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -45,7 +45,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
std::deque<int>::iterator ii1{}, ii2{};
std::deque<int>::iterator ii4 = ii1;
std::deque<int>::const_iterator cii{};
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=188019&r1=188018&r2=188019&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 Thu Aug 8 16:52:50 2013
@@ -121,7 +121,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
std::forward_list<int>::iterator ii1{}, ii2{};
std::forward_list<int>::iterator ii4 = ii1;
std::forward_list<int>::const_iterator cii{};
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=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/vector.bool/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -95,7 +95,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
std::vector<bool>::iterator ii1{}, ii2{};
std::vector<bool>::iterator ii4 = ii1;
std::vector<bool>::const_iterator cii{};
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=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/sequences/vector/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -136,7 +136,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
typedef std::vector<int> C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
Modified: libcxx/trunk/test/containers/unord/unord.map/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/unord/unord.map/iterators.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/unord/unord.map/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/unord/unord.map/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -109,7 +109,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
typedef std::unordered_map<int,double> C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
Modified: libcxx/trunk/test/containers/unord/unord.multimap/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/unord/unord.multimap/iterators.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/unord/unord.multimap/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/unord/unord.multimap/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -115,7 +115,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
typedef std::unordered_multimap<int,double> C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
Modified: libcxx/trunk/test/containers/unord/unord.multiset/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/unord/unord.multiset/iterators.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/unord/unord.multiset/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/unord/unord.multiset/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -108,7 +108,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
typedef std::unordered_multiset<int> C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
Modified: libcxx/trunk/test/containers/unord/unord.set/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/unord/unord.set/iterators.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/containers/unord/unord.set/iterators.pass.cpp (original)
+++ libcxx/trunk/test/containers/unord/unord.set/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -108,7 +108,7 @@ int main()
}
#endif
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
typedef std::unordered_set<int> C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
Modified: libcxx/trunk/test/strings/basic.string/string.iterators/iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/strings/basic.string/string.iterators/iterators.pass.cpp?rev=188019&r1=188018&r2=188019&view=diff
==============================================================================
--- libcxx/trunk/test/strings/basic.string/string.iterators/iterators.pass.cpp (original)
+++ libcxx/trunk/test/strings/basic.string/string.iterators/iterators.pass.cpp Thu Aug 8 16:52:50 2013
@@ -22,7 +22,7 @@
int main()
{
#if _LIBCPP_STD_VER > 11
- { // N3664 testing
+ { // N3644 testing
typedef std::string C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
@@ -34,7 +34,7 @@ int main()
assert ( !(ii1 != cii ));
}
- { // N3664 testing
+ { // N3644 testing
typedef std::wstring C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
@@ -46,7 +46,7 @@ int main()
assert ( !(ii1 != cii ));
}
- { // N3664 testing
+ { // N3644 testing
typedef std::u16string C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
@@ -58,7 +58,7 @@ int main()
assert ( !(ii1 != cii ));
}
- { // N3664 testing
+ { // N3644 testing
typedef std::u32string C;
C::iterator ii1{}, ii2{};
C::iterator ii4 = ii1;
More information about the cfe-commits
mailing list