From: Andrei Pavel Date: Wed, 17 May 2023 16:09:39 +0000 (+0300) Subject: [#2658] address review comments X-Git-Tag: Kea-2.3.8~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5704c8ccad4dac1381bf6e20193735ce66ca083;p=thirdparty%2Fkea.git [#2658] address review comments --- diff --git a/src/bin/dhcp4/tests/fqdn_unittest.cc b/src/bin/dhcp4/tests/fqdn_unittest.cc index 2b87a360a1..0ad951ada0 100644 --- a/src/bin/dhcp4/tests/fqdn_unittest.cc +++ b/src/bin/dhcp4/tests/fqdn_unittest.cc @@ -908,21 +908,6 @@ public: ASSERT_TRUE(obs) << "cannot find: " << stats_name; EXPECT_EQ(exp_value, obs->getInteger().first); } - - /// @brief Checks the value of a big integer statistic for a given subnet. - /// - /// @param subnet_id identifier of a subnet for which the statistic should be checked - /// @param name statistic name (e.g. "total-nas", "total-pds", ...) - /// @param exp_value expected value of the statistic - /// - /// @return Number of assigned addresses for a subnet. - void checkBigSubnetStat(const SubnetID& subnet_id, const std::string& name, int64_t exp_value) const { - // Retrieve statistics name, e.g. subnet[1234].assigned-addresses. - const std::string stats_name = StatsMgr::generateName("subnet", subnet_id, name); - ObservationPtr obs = StatsMgr::instance().getObservation(stats_name); - ASSERT_TRUE(obs) << "cannot find: " << stats_name; - EXPECT_EQ(exp_value, obs->getBigInteger().first); - } }; // Tests the following scenario: diff --git a/src/lib/cc/data.h b/src/lib/cc/data.h index 6e29f2fbf2..e954ea9009 100644 --- a/src/lib/cc/data.h +++ b/src/lib/cc/data.h @@ -215,7 +215,8 @@ public: /// @name pure virtuals, every derived class must implement these - /// @return true if the other ElementPtr has the same type and value + /// @return true if the other ElementPtr has the same value and the same + /// type (or a different and compatible type), false otherwise. virtual bool equals(const Element& other) const = 0; /// Converts the Element to JSON format and appends it to @@ -656,7 +657,10 @@ public: /// stringstream. void toJSON(std::ostream& ss) const override; - /// @brief Checks whether the other Element has the same type and value. + /// @brief Checks whether the other Element is equal. + /// + /// @return true if the other ElementPtr has the same value and the same + /// type (or a different and compatible type), false otherwise. bool equals(const Element& other) const override; private: