From c1919729a3dea51ca108a6d964d3a6f2b775e55c Mon Sep 17 00:00:00 2001 From: Vishakha Gupta-Cledat Date: Thu, 24 May 2018 21:49:38 +0000 Subject: [PATCH] Fix loop counter in PMGD test cases. --- tests/pmgd_queries.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/pmgd_queries.cc b/tests/pmgd_queries.cc index 8f14c5df..e2d1f244 100644 --- a/tests/pmgd_queries.cc +++ b/tests/pmgd_queries.cc @@ -251,8 +251,8 @@ TEST(PMGDQueryHandler, queryTestList) vector> responses = qh.process_queries(cmds, query_count, true); int nodecount, propcount = 0; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) { @@ -458,8 +458,8 @@ TEST(PMGDQueryHandler, queryNeighborTestList) vector> responses = qh.process_queries(cmds, query_count, true); int nodecount, propcount = 0; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) { @@ -560,8 +560,8 @@ TEST(PMGDQueryHandler, queryConditionalNeighborTestList) vector> responses = qh.process_queries(cmds, query_count, true); int nodecount, propcount = 0; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) { @@ -838,8 +838,8 @@ TEST(PMGDQueryHandler, queryNeighborLinksTestList) vector> responses = qh.process_queries(cmds, query_count, true); int nodecount, propcount = 0; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) { @@ -954,8 +954,8 @@ TEST(PMGDQueryHandler, queryNeighborLinksReuseTestList) vector> responses = qh.process_queries(cmds, query_count, true); int nodecount = 0, propcount = 0; int totnodecount = 0, totpropcount = 0; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) { @@ -1081,8 +1081,8 @@ TEST(PMGDQueryHandler, querySortedNeighborLinksReuseTestList) int nodecount = 0, propcount = 0; int totnodecount = 0, totpropcount = 0; bool firstquery = true; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) { @@ -1162,8 +1162,8 @@ TEST(PMGDQueryHandler, queryTestListLimit) vector> responses = qh.process_queries(cmds, query_count, true); int nodecount, propcount = 0; - for (int i = 0; i < query_count; ++i) { - vector response = responses[i]; + for (int q = 0; q < query_count; ++q) { + vector response = responses[q]; for (auto it : response) { EXPECT_EQ(it->error_code(), protobufs::CommandResponse::Success) << it->error_msg(); if (it->r_type() == protobufs::List) {