aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2015-02-18 22:15:14 -0800
committerGravatar vjpai <vpai@google.com>2015-02-18 22:15:14 -0800
commitc1231eb543d0805cf91b9628a2dfd059990fd079 (patch)
treec9528c80580702d9c6d202025dc26e76a426ff2c /test
parentcad5f0a44859e27736bfb4ce5fc374781c54bbc1 (diff)
Include typecasts so that int and size_t are not compared (since their
signs don't match)
Diffstat (limited to 'test')
-rw-r--r--test/cpp/client/channel_arguments_test.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/cpp/client/channel_arguments_test.cc b/test/cpp/client/channel_arguments_test.cc
index d98b38ab68..01c56cb795 100644
--- a/test/cpp/client/channel_arguments_test.cc
+++ b/test/cpp/client/channel_arguments_test.cc
@@ -52,14 +52,14 @@ TEST_F(ChannelArgumentsTest, SetInt) {
ChannelArguments channel_args;
// Empty arguments.
SetChannelArgs(channel_args, &args);
- EXPECT_EQ(0, args.num_args);
+ EXPECT_EQ(static_cast<size_t>(0), args.num_args);
grpc::string key("key0");
channel_args.SetInt(key, 0);
// Clear key early to make sure channel_args takes a copy
key = "";
SetChannelArgs(channel_args, &args);
- EXPECT_EQ(1, args.num_args);
+ EXPECT_EQ(static_cast<size_t>(1), args.num_args);
EXPECT_EQ(GRPC_ARG_INTEGER, args.args[0].type);
EXPECT_STREQ("key0", args.args[0].key);
EXPECT_EQ(0, args.args[0].value.integer);
@@ -68,7 +68,7 @@ TEST_F(ChannelArgumentsTest, SetInt) {
channel_args.SetInt(key, 1);
key = "";
SetChannelArgs(channel_args, &args);
- EXPECT_EQ(2, args.num_args);
+ EXPECT_EQ(static_cast<size_t>(2), args.num_args);
// We do not enforce order on the arguments.
for (size_t i = 0; i < args.num_args; i++) {
EXPECT_EQ(GRPC_ARG_INTEGER, args.args[i].type);
@@ -85,7 +85,7 @@ TEST_F(ChannelArgumentsTest, SetString) {
ChannelArguments channel_args;
// Empty arguments.
SetChannelArgs(channel_args, &args);
- EXPECT_EQ(0, args.num_args);
+ EXPECT_EQ(static_cast<size_t>(0), args.num_args);
grpc::string key("key0");
grpc::string val("val0");
@@ -94,7 +94,7 @@ TEST_F(ChannelArgumentsTest, SetString) {
key = "";
val = "";
SetChannelArgs(channel_args, &args);
- EXPECT_EQ(1, args.num_args);
+ EXPECT_EQ(static_cast<size_t>(1), args.num_args);
EXPECT_EQ(GRPC_ARG_STRING, args.args[0].type);
EXPECT_STREQ("key0", args.args[0].key);
EXPECT_STREQ("val0", args.args[0].value.string);
@@ -103,7 +103,7 @@ TEST_F(ChannelArgumentsTest, SetString) {
val = "val1";
channel_args.SetString(key, val);
SetChannelArgs(channel_args, &args);
- EXPECT_EQ(2, args.num_args);
+ EXPECT_EQ(static_cast<size_t>(2), args.num_args);
// We do not enforce order on the arguments.
for (size_t i = 0; i < args.num_args; i++) {
EXPECT_EQ(GRPC_ARG_STRING, args.args[i].type);