aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/util/byte_buffer_test.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-26 16:16:06 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-26 16:16:06 -0700
commitd41a4a720f76c6555b80f82ee771071e09d55e03 (patch)
tree1ca017c927b7b3f80204ecc362c22468d3775887 /test/cpp/util/byte_buffer_test.cc
parent6b5d682c981f365d1f3c1bf771f113bd727d5ee0 (diff)
s/gpr_slice/grpc_slice, and move around tests, impls
Diffstat (limited to 'test/cpp/util/byte_buffer_test.cc')
-rw-r--r--test/cpp/util/byte_buffer_test.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc
index 2089a62011..f66f471d7e 100644
--- a/test/cpp/util/byte_buffer_test.cc
+++ b/test/cpp/util/byte_buffer_test.cc
@@ -49,14 +49,14 @@ const char* kContent2 = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy world";
class ByteBufferTest : public ::testing::Test {};
TEST_F(ByteBufferTest, CreateFromSingleSlice) {
- gpr_slice hello = gpr_slice_from_copied_string(kContent1);
+ grpc_slice hello = grpc_slice_from_copied_string(kContent1);
Slice s(hello, Slice::STEAL_REF);
ByteBuffer buffer(&s, 1);
}
TEST_F(ByteBufferTest, CreateFromVector) {
- gpr_slice hello = gpr_slice_from_copied_string(kContent1);
- gpr_slice world = gpr_slice_from_copied_string(kContent2);
+ grpc_slice hello = grpc_slice_from_copied_string(kContent1);
+ grpc_slice world = grpc_slice_from_copied_string(kContent2);
std::vector<Slice> slices;
slices.push_back(Slice(hello, Slice::STEAL_REF));
slices.push_back(Slice(world, Slice::STEAL_REF));
@@ -64,15 +64,15 @@ TEST_F(ByteBufferTest, CreateFromVector) {
}
TEST_F(ByteBufferTest, Clear) {
- gpr_slice hello = gpr_slice_from_copied_string(kContent1);
+ grpc_slice hello = grpc_slice_from_copied_string(kContent1);
Slice s(hello, Slice::STEAL_REF);
ByteBuffer buffer(&s, 1);
buffer.Clear();
}
TEST_F(ByteBufferTest, Length) {
- gpr_slice hello = gpr_slice_from_copied_string(kContent1);
- gpr_slice world = gpr_slice_from_copied_string(kContent2);
+ grpc_slice hello = grpc_slice_from_copied_string(kContent1);
+ grpc_slice world = grpc_slice_from_copied_string(kContent2);
std::vector<Slice> slices;
slices.push_back(Slice(hello, Slice::STEAL_REF));
slices.push_back(Slice(world, Slice::STEAL_REF));
@@ -80,7 +80,7 @@ TEST_F(ByteBufferTest, Length) {
EXPECT_EQ(strlen(kContent1) + strlen(kContent2), buffer.Length());
}
-bool SliceEqual(const Slice& a, gpr_slice b) {
+bool SliceEqual(const Slice& a, grpc_slice b) {
if (a.size() != GPR_SLICE_LENGTH(b)) {
return false;
}
@@ -93,8 +93,8 @@ bool SliceEqual(const Slice& a, gpr_slice b) {
}
TEST_F(ByteBufferTest, Dump) {
- gpr_slice hello = gpr_slice_from_copied_string(kContent1);
- gpr_slice world = gpr_slice_from_copied_string(kContent2);
+ grpc_slice hello = grpc_slice_from_copied_string(kContent1);
+ grpc_slice world = grpc_slice_from_copied_string(kContent2);
std::vector<Slice> slices;
slices.push_back(Slice(hello, Slice::STEAL_REF));
slices.push_back(Slice(world, Slice::STEAL_REF));
@@ -106,8 +106,8 @@ TEST_F(ByteBufferTest, Dump) {
}
TEST_F(ByteBufferTest, SerializationMakesCopy) {
- gpr_slice hello = gpr_slice_from_copied_string(kContent1);
- gpr_slice world = gpr_slice_from_copied_string(kContent2);
+ grpc_slice hello = grpc_slice_from_copied_string(kContent1);
+ grpc_slice world = grpc_slice_from_copied_string(kContent2);
std::vector<Slice> slices;
slices.push_back(Slice(hello, Slice::STEAL_REF));
slices.push_back(Slice(world, Slice::STEAL_REF));