I believe this finishes up debug mode for list. The testing is a little weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61fe0ac9b3
commit
2062f37772
@ -11,6 +11,10 @@
|
||||
|
||||
// void splice(const_iterator position, list& x);
|
||||
|
||||
#if _LIBCPP_DEBUG2 >= 1
|
||||
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
|
||||
#endif
|
||||
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
@ -397,4 +401,12 @@ int main()
|
||||
++i;
|
||||
assert(*i == 6);
|
||||
}
|
||||
#if _LIBCPP_DEBUG2 >= 1
|
||||
{
|
||||
std::list<int> v1(3);
|
||||
std::list<int> v2(3);
|
||||
v1.splice(v2.begin(), v2);
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
// void splice(const_iterator position, list<T,Allocator>& x, iterator i);
|
||||
|
||||
#if _LIBCPP_DEBUG2 >= 1
|
||||
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
|
||||
#endif
|
||||
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
@ -174,4 +178,12 @@ int main()
|
||||
++i;
|
||||
assert(*i == 2);
|
||||
}
|
||||
#if _LIBCPP_DEBUG2 >= 1
|
||||
{
|
||||
std::list<int> v1(3);
|
||||
std::list<int> v2(3);
|
||||
v1.splice(v1.begin(), v2, v1.begin());
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
// void splice(const_iterator position, list& x, iterator first, iterator last);
|
||||
|
||||
#if _LIBCPP_DEBUG2 >= 1
|
||||
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
|
||||
#endif
|
||||
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
@ -114,4 +118,12 @@ int main()
|
||||
i = l2.begin();
|
||||
assert(*i == 4);
|
||||
}
|
||||
#if _LIBCPP_DEBUG2 >= 1
|
||||
{
|
||||
std::list<int> v1(3);
|
||||
std::list<int> v2(3);
|
||||
v1.splice(v1.begin(), v2, v2.begin(), v1.end());
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ record which parts of libc++ have debug mode support.
|
||||
<code><list></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><!-- ✓ --></td>
|
||||
<td align="center"> ✓ </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user