diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-04-16 21:42:36 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-04-16 21:42:36 +0000 |
commit | 9a20da75ef1147e4d79506ee012da6cdc942a890 (patch) | |
tree | c61e5c78ac1ff86cbdc855cb2c2b16cc898b6881 | |
parent | 4082c43d0609b03cfd1182fd15e01f7fcbdd1992 (diff) | |
download | bcm5719-llvm-9a20da75ef1147e4d79506ee012da6cdc942a890.tar.gz bcm5719-llvm-9a20da75ef1147e4d79506ee012da6cdc942a890.zip |
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.
llvm-svn: 179632
4 files changed, 37 insertions, 1 deletions
diff --git a/libcxx/test/containers/sequences/list/list.ops/splice_pos_list.pass.cpp b/libcxx/test/containers/sequences/list/list.ops/splice_pos_list.pass.cpp index 54dc6612522..26d191216c7 100644 --- a/libcxx/test/containers/sequences/list/list.ops/splice_pos_list.pass.cpp +++ b/libcxx/test/containers/sequences/list/list.ops/splice_pos_list.pass.cpp @@ -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 } diff --git a/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp b/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp index 4e8ca46e231..64402ce1bc7 100644 --- a/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp +++ b/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp @@ -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 } diff --git a/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp b/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp index 685b392abcf..2dabf837f12 100644 --- a/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp +++ b/libcxx/test/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp @@ -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 } diff --git a/libcxx/www/debug_mode.html b/libcxx/www/debug_mode.html index da037ea9301..ba491b34b61 100644 --- a/libcxx/www/debug_mode.html +++ b/libcxx/www/debug_mode.html @@ -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> |