N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests

llvm-svn: 188019
This commit is contained in:
Marshall Clow 2013-08-08 21:52:50 +00:00
parent db8bf8313a
commit 2472b928d2
15 changed files with 80 additions and 15 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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{};

View File

@ -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{};

View File

@ -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{};

View File

@ -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{};

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;