diff options
author | Yang Gao <yangg@google.com> | 2015-03-10 22:56:02 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-03-10 22:56:02 -0700 |
commit | 42734b58eebcbb8881b2a92fc006af6ffdd56710 (patch) | |
tree | 8df0f47aed23d6ea1baef22207360bc258622bbb /test | |
parent | c65569fba8b9f509ff7cd79e057f95ee98164e1a (diff) | |
parent | bf5ec2fd3d6c72bb4f887fc25c41de2fc5ef6f87 (diff) |
Merge pull request #978 from Chilledheart/master
Avoid unnecessary copies during protobuf serialization and deserialization
Diffstat (limited to 'test')
-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; |