diff options
author | Chilledheart <rwindz0@gmail.com> | 2015-03-10 01:19:15 +0800 |
---|---|---|
committer | Chilledheart <rwindz0@gmail.com> | 2015-03-10 01:20:55 +0800 |
commit | ca767c0d9e314489fd10d7bc3ce406f8e223e70e (patch) | |
tree | adfd7461d03df4da1f927c5dfbfc146ffbf8ad2d /test/core | |
parent | d3be281353dcfa4cd3d7c30e68f7e9960455fced (diff) |
Add method grp_slice_buffer_pop to remove the last element for grp_slice_buffer
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/support/slice_buffer_test.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/core/support/slice_buffer_test.c b/test/core/support/slice_buffer_test.c index 8301795dbf..a48278434f 100644 --- a/test/core/support/slice_buffer_test.c +++ b/test/core/support/slice_buffer_test.c @@ -62,8 +62,13 @@ int main(int argc, char **argv) { } GPR_ASSERT(buf.count > 0); GPR_ASSERT(buf.length == 50); - gpr_slice_unref(aaa); - gpr_slice_unref(bb); + for (i = 0; i < 10; i++) { + gpr_slice_buffer_pop(&buf); + gpr_slice_unref(aaa); + gpr_slice_unref(bb); + } + GPR_ASSERT(buf.count == 0); + GPR_ASSERT(buf.length == 0); gpr_slice_buffer_destroy(&buf); return 0; |