From: Yoshitaka Aharen Date: Fri, 12 Oct 2012 05:21:15 +0000 (+0900) Subject: [2155] update test case according to the review comment X-Git-Tag: bind10-1.1.0beta1-release~85^2~5^2~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb246fec83de75f41171b48f48c314b985a985de;p=thirdparty%2Fkea.git [2155] update test case according to the review comment Conflicts: src/bin/auth/tests/auth_srv_unittest.cc --- diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc index d310bd7c49..5a1ed45867 100644 --- a/src/bin/auth/tests/auth_srv_unittest.cc +++ b/src/bin/auth/tests/auth_srv_unittest.cc @@ -131,17 +131,8 @@ protected: // Checks whether all Rcode counters are set to zero void checkAllRcodeCountersZero() const { - const std::map - stats_map(server.getStatistics()->get("zones")->get("_SERVER_")-> - get("rcode")->mapValue()); - - for (std::map::const_iterator - i = stats_map.begin(), e = stats_map.end(); - i != e; - ++i) - { - checkRcodeCounter(i->first, i->second->intValue(), 0); - } + // with checking NOERROR == 0 and the others are 0 + checkAllRcodeCountersZeroExcept(Rcode::NOERROR(), 0); } // Checks whether all Rcode counters are set to zero except the given @@ -242,6 +233,8 @@ createBuiltinVersionResponse(const qid_t qid, vector& data) { renderer.getLength()); } +// Check if the item has expected value. +// Before reading the item, check the item exists. void expectCounterItem(ConstElementPtr stats, const std::string& item, const int expected) {