diff options
author | Mukund Sivaraman <muks@isc.org> | 2014-02-19 09:19:06 +0100 |
---|---|---|
committer | Mukund Sivaraman <muks@isc.org> | 2014-02-19 09:19:06 +0100 |
commit | 0c6ca2779a9152db8f4d43a88faf382380769961 (patch) | |
tree | 914198bcbb867814d09a6fbcf0aa4afda94408ce /src/lib/dns/tests/rdata_caa_unittest.cc | |
parent | Merge branch 'master' into trac2512 (diff) | |
download | kea-0c6ca2779a9152db8f4d43a88faf382380769961.tar.xz kea-0c6ca2779a9152db8f4d43a88faf382380769961.zip |
[2512] Stop using API that was removed
Diffstat (limited to 'src/lib/dns/tests/rdata_caa_unittest.cc')
-rw-r--r-- | src/lib/dns/tests/rdata_caa_unittest.cc | 48 |
1 files changed, 18 insertions, 30 deletions
diff --git a/src/lib/dns/tests/rdata_caa_unittest.cc b/src/lib/dns/tests/rdata_caa_unittest.cc index a2a9f9ea80..b88aba31e7 100644 --- a/src/lib/dns/tests/rdata_caa_unittest.cc +++ b/src/lib/dns/tests/rdata_caa_unittest.cc @@ -26,14 +26,17 @@ #include <dns/tests/unittest_util.h> #include <dns/tests/rdata_unittest.h> +#include <util/unittests/wiredata.h> + #include <boost/algorithm/string.hpp> -using isc::UnitTestUtil; using namespace std; using namespace isc; using namespace isc::dns; using namespace isc::util; using namespace isc::dns::rdata; +using isc::UnitTestUtil; +using isc::util::unittests::matchWireData; namespace { class Rdata_CAA_Test : public RdataTest { @@ -237,16 +240,11 @@ TEST_F(Rdata_CAA_Test, toText) { } TEST_F(Rdata_CAA_Test, toWire) { - this->obuffer.clear(); - rdata_caa.toWire(this->obuffer); + obuffer.clear(); + rdata_caa.toWire(obuffer); - EXPECT_EQ(sizeof (rdata_caa_wiredata), - this->obuffer.getLength()); - - EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, - this->obuffer.getData(), - this->obuffer.getLength(), - rdata_caa_wiredata, sizeof(rdata_caa_wiredata)); + matchWireData(rdata_caa_wiredata, sizeof(rdata_caa_wiredata), + obuffer.getData(), obuffer.getLength()); } TEST_F(Rdata_CAA_Test, compare) { @@ -277,9 +275,8 @@ TEST_F(Rdata_CAA_Test, getValue) { }; const std::vector<uint8_t>& value = rdata_caa.getValue(); - EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, - &value[0], value.size(), - value_data, sizeof(value_data)); + matchWireData(value_data, sizeof(value_data), + &value[0], value.size()); } TEST_F(Rdata_CAA_Test, emptyValueFromWire) { @@ -300,15 +297,11 @@ TEST_F(Rdata_CAA_Test, emptyValueFromWire) { EXPECT_EQ(0, rdf.getFlags()); EXPECT_EQ("issue", rdf.getTag()); - this->obuffer.clear(); - rdf.toWire(this->obuffer); - - EXPECT_EQ(sizeof(rdf_wiredata), this->obuffer.getLength()); + obuffer.clear(); + rdf.toWire(obuffer); - EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, - this->obuffer.getData(), - this->obuffer.getLength(), - rdf_wiredata, sizeof(rdf_wiredata)); + matchWireData(rdf_wiredata, sizeof(rdf_wiredata), + obuffer.getData(), obuffer.getLength()); } TEST_F(Rdata_CAA_Test, emptyValueFromString) { @@ -325,15 +318,10 @@ TEST_F(Rdata_CAA_Test, emptyValueFromString) { EXPECT_EQ(0, rdata_caa2.getFlags()); EXPECT_EQ("issue", rdata_caa2.getTag()); - this->obuffer.clear(); - rdata_caa2.toWire(this->obuffer); - - EXPECT_EQ(sizeof(rdata_caa2_wiredata), - this->obuffer.getLength()); + obuffer.clear(); + rdata_caa2.toWire(obuffer); - EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, - this->obuffer.getData(), - this->obuffer.getLength(), - rdata_caa2_wiredata, sizeof(rdata_caa2_wiredata)); + matchWireData(rdata_caa2_wiredata, sizeof(rdata_caa2_wiredata), + obuffer.getData(), obuffer.getLength()); } } |