aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-22 14:23:51 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-22 14:23:51 -0800
commit00f8702c5ed38bb199050bb5e000204d9cd30f98 (patch)
tree902f39826b3d1febc25ebb7658f761351df21f39 /test/cpp
parent2e14b1f588a5a198a4b20d2801e199de49ac5f9c (diff)
parent67f23d783265fa6c6cc85da3fb61d42f01cadbaa (diff)
Merge branch 'yawn' into proto_names
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/end2end/zookeeper_test.cc2
-rw-r--r--test/cpp/util/string_ref_test.cc6
2 files changed, 5 insertions, 3 deletions
diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc
index 4044624b73..802df6bb94 100644
--- a/test/cpp/end2end/zookeeper_test.cc
+++ b/test/cpp/end2end/zookeeper_test.cc
@@ -157,7 +157,7 @@ class ZookeeperTest : public ::testing::Test {
void ResetStub() {
string target = "zookeeper://" + zookeeper_address_ + "/test";
channel_ = CreateChannel(target, InsecureChannelCredentials());
- stub_ = std::move(grpc::testing::TestService::NewStub(channel_));
+ stub_ = grpc::testing::TestService::NewStub(channel_);
}
string to_string(const int number) {
diff --git a/test/cpp/util/string_ref_test.cc b/test/cpp/util/string_ref_test.cc
index 44a298d892..d94aa5962b 100644
--- a/test/cpp/util/string_ref_test.cc
+++ b/test/cpp/util/string_ref_test.cc
@@ -102,7 +102,8 @@ TEST_F(StringRefTest, Iterator) {
string_ref s(kTestString);
size_t i = 0;
for (auto it = s.cbegin(); it != s.cend(); ++it) {
- EXPECT_EQ(kTestString[i++], *it);
+ auto val = kTestString[i++];
+ EXPECT_EQ(val, *it);
}
EXPECT_EQ(strlen(kTestString), i);
}
@@ -111,7 +112,8 @@ TEST_F(StringRefTest, ReverseIterator) {
string_ref s(kTestString);
size_t i = strlen(kTestString);
for (auto rit = s.crbegin(); rit != s.crend(); ++rit) {
- EXPECT_EQ(kTestString[--i], *rit);
+ auto val = kTestString[--i];
+ EXPECT_EQ(val, *rit);
}
EXPECT_EQ(0U, i);
}