aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Chilledheart <rwindz0@gmail.com>2015-03-10 01:19:15 +0800
committerGravatar Chilledheart <rwindz0@gmail.com>2015-03-10 01:20:55 +0800
commitca767c0d9e314489fd10d7bc3ce406f8e223e70e (patch)
treeadfd7461d03df4da1f927c5dfbfc146ffbf8ad2d /test/core
parentd3be281353dcfa4cd3d7c30e68f7e9960455fced (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.c9
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;