Commit fe418378 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

Merge branch 'trac2168'

parents 920f2929 e07be6f5
......@@ -44,6 +44,7 @@
#include <util/unittests/mock_socketsession.h>
#include <dns/tests/unittest_util.h>
#include <util/unittests/wiredata.h>
#include <testutils/dnsmessage_test.h>
#include <testutils/srv_test.h>
#include <testutils/mockups.h>
......@@ -82,8 +83,9 @@ using namespace isc::testutils;
using namespace isc::server_common::portconfig;
using namespace isc::auth::unittest;
using isc::UnitTestUtil;
using boost::scoped_ptr;
using isc::auth::statistics::Counters;
using isc::util::unittests::matchWireData;
using boost::scoped_ptr;
namespace {
const char* const CONFIG_TESTDB =
......@@ -1072,10 +1074,9 @@ TEST_F(AuthSrvTest, builtInQueryViaDNSServer) {
response_message, response_obuffer);
createBuiltinVersionResponse(default_qid, response_data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
response_obuffer->getData(),
response_obuffer->getLength(),
&response_data[0], response_data.size());
matchWireData(&response_data[0], response_data.size(),
response_obuffer->getData(),
response_obuffer->getLength());
// After it has been run, the message should be cleared
EXPECT_EQ(0, parse_message->getRRCount(Message::SECTION_QUESTION));
......@@ -1095,10 +1096,9 @@ TEST_F(AuthSrvTest, builtInQuery) {
server.processMessage(*io_message, *parse_message, *response_obuffer,
&dnsserv);
createBuiltinVersionResponse(default_qid, response_data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
response_obuffer->getData(),
response_obuffer->getLength(),
&response_data[0], response_data.size());
matchWireData(&response_data[0], response_data.size(),
response_obuffer->getData(),
response_obuffer->getLength());
checkAllRcodeCountersZeroExcept(Rcode::NOERROR(), 1);
}
......@@ -1114,10 +1114,9 @@ TEST_F(AuthSrvTest, iqueryViaDNSServer) {
UnitTestUtil::readWireData("iquery_response_fromWire.wire",
response_data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
response_obuffer->getData(),
response_obuffer->getLength(),
&response_data[0], response_data.size());
matchWireData(&response_data[0], response_data.size(),
response_obuffer->getData(),
response_obuffer->getLength());
}
// Install a Sqlite3 data source with testing data.
......
......@@ -31,12 +31,14 @@
#include <gtest/gtest.h>
#include <dns/tests/unittest_util.h>
#include <util/unittests/wiredata.h>
using isc::UnitTestUtil;
using namespace std;
using namespace isc::dns;
using namespace isc::util;
using namespace isc::dns::rdata;
using isc::UnitTestUtil;
using isc::util::unittests::matchWireData;
const uint8_t EDNS::SUPPORTED_VERSION;
......@@ -159,8 +161,8 @@ TEST_F(EDNSTest, toWireRenderer) {
EXPECT_EQ(1, edns_base.toWire(renderer,
Rcode::NOERROR().getExtendedCode()));
UnitTestUtil::readWireData("edns_toWire1.wire", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
renderer.getData(), renderer.getLength());
// Typical case, enabling DNSSEC
renderer.clear();
......@@ -169,8 +171,8 @@ TEST_F(EDNSTest, toWireRenderer) {
EXPECT_EQ(1, edns_base.toWire(renderer,
Rcode::NOERROR().getExtendedCode()));
UnitTestUtil::readWireData("edns_toWire2.wire", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
renderer.getData(), renderer.getLength());
// Non-0 extended Rcode
renderer.clear();
......@@ -179,8 +181,8 @@ TEST_F(EDNSTest, toWireRenderer) {
EXPECT_EQ(1, edns_base.toWire(renderer,
Rcode::BADVERS().getExtendedCode()));
UnitTestUtil::readWireData("edns_toWire3.wire", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
renderer.getData(), renderer.getLength());
// Uncommon UDP buffer size
renderer.clear();
......@@ -190,8 +192,8 @@ TEST_F(EDNSTest, toWireRenderer) {
EXPECT_EQ(1, edns_base.toWire(renderer,
Rcode::NOERROR().getExtendedCode()));
UnitTestUtil::readWireData("edns_toWire4.wire", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
renderer.getData(), renderer.getLength());
// From RR with unknown flag. If used for toWire(), the unknown flag
// should disappear.
......@@ -201,8 +203,8 @@ TEST_F(EDNSTest, toWireRenderer) {
*opt_rdata).toWire(renderer,
Rcode::NOERROR().getExtendedCode()));
UnitTestUtil::readWireData("edns_toWire2.wire", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
renderer.getData(), renderer.getLength());
// If the available length in the renderer is not sufficient for the OPT
// RR, it shouldn't be inserted.
......@@ -222,8 +224,8 @@ TEST_F(EDNSTest, toWireBuffer) {
EXPECT_EQ(1, edns_base.toWire(obuffer,
Rcode::NOERROR().getExtendedCode()));
UnitTestUtil::readWireData("edns_toWire1.wire", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, obuffer.getData(),
obuffer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
obuffer.getData(), obuffer.getLength());
}
TEST_F(EDNSTest, createFromRR) {
......
......@@ -41,13 +41,15 @@
#include <gtest/gtest.h>
#include <dns/tests/unittest_util.h>
#include <util/unittests/wiredata.h>
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;
//
// Note: we need more tests, including:
......@@ -217,10 +219,9 @@ TEST_F(MessageTest, fromWireWithTSIG) {
EXPECT_EQ(TSIGKey::HMACMD5_NAME(), tsig_rr->getRdata().getAlgorithm());
EXPECT_EQ(0x4da8877a, tsig_rr->getRdata().getTimeSigned());
EXPECT_EQ(TSIGContext::DEFAULT_FUDGE, tsig_rr->getRdata().getFudge());
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
tsig_rr->getRdata().getMAC(),
tsig_rr->getRdata().getMACSize(),
expected_mac, sizeof(expected_mac));
matchWireData(expected_mac, sizeof(expected_mac),
tsig_rr->getRdata().getMAC(),
tsig_rr->getRdata().getMACSize());
EXPECT_EQ(0, tsig_rr->getRdata().getError());
EXPECT_EQ(0, tsig_rr->getRdata().getOtherLen());
EXPECT_EQ(static_cast<void*>(NULL), tsig_rr->getRdata().getOtherData());
......@@ -758,8 +759,8 @@ TEST_F(MessageTest, toWire) {
message_render.toWire(renderer);
vector<unsigned char> data;
UnitTestUtil::readWireData("message_toWire1", data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageTest, toWireSigned) {
......@@ -795,8 +796,8 @@ TEST_F(MessageTest, toWireSigned) {
message_render.toWire(renderer);
vector<unsigned char> data;
UnitTestUtil::readWireData("message_toWire6", data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageTest, toWireSignedAndTruncated) {
......@@ -839,8 +840,8 @@ TEST_F(MessageTest, toWireSignedAndTruncated) {
message_render.toWire(renderer);
vector<unsigned char> data;
UnitTestUtil::readWireData("message_toWire7", data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageTest, toWireInParseMode) {
......@@ -896,9 +897,8 @@ commonTSIGToWireCheck(Message& message, MessageRenderer& renderer,
message.toWire(renderer, &tsig_ctx);
vector<unsigned char> expected_data;
UnitTestUtil::readWireData(expected_file, expected_data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(),
&expected_data[0], expected_data.size());
matchWireData(&expected_data[0], expected_data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageTest, toWireWithTSIG) {
......
......@@ -19,6 +19,7 @@
#include <dns/messagerenderer.h>
#include <dns/tests/unittest_util.h>
#include <util/unittests/wiredata.h>
#include <gtest/gtest.h>
......@@ -33,6 +34,7 @@ using isc::dns::LabelSequence;
using isc::dns::MessageRenderer;
using isc::util::OutputBuffer;
using boost::lexical_cast;
using isc::util::unittests::matchWireData;
namespace {
class MessageRendererTest : public ::testing::Test {
......@@ -56,8 +58,8 @@ TEST_F(MessageRendererTest, writeIntger) {
renderer.writeUint16(data16);
expected_size += sizeof(data16);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &testdata[1], sizeof(data16));
matchWireData(&testdata[1], sizeof(data16),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeName) {
......@@ -65,8 +67,8 @@ TEST_F(MessageRendererTest, writeName) {
renderer.writeName(Name("a.example.com."));
renderer.writeName(Name("b.example.com."));
renderer.writeName(Name("a.example.org."));
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeNameInLargeBuffer) {
......@@ -77,11 +79,9 @@ TEST_F(MessageRendererTest, writeNameInLargeBuffer) {
renderer.writeName(Name("a.example.com."));
renderer.writeName(Name("a.example.com."));
renderer.writeName(Name("b.example.com."));
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
static_cast<const uint8_t*>(renderer.getData()) +
offset,
renderer.getLength() - offset,
&data[0], data.size());
matchWireData(&data[0], data.size(),
static_cast<const uint8_t*>(renderer.getData()) + offset,
renderer.getLength() - offset);
}
TEST_F(MessageRendererTest, writeNameWithUncompressed) {
......@@ -89,8 +89,8 @@ TEST_F(MessageRendererTest, writeNameWithUncompressed) {
renderer.writeName(Name("a.example.com."));
renderer.writeName(Name("b.example.com."), false);
renderer.writeName(Name("b.example.com."));
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeNamePointerChain) {
......@@ -98,8 +98,8 @@ TEST_F(MessageRendererTest, writeNamePointerChain) {
renderer.writeName(Name("a.example.com."));
renderer.writeName(Name("b.example.com."));
renderer.writeName(Name("b.example.com."));
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, compressMode) {
......@@ -126,8 +126,8 @@ TEST_F(MessageRendererTest, writeNameCaseCompress) {
// this should match the first name in terms of compression:
renderer.writeName(Name("b.exAmple.CoM."));
renderer.writeName(Name("a.example.org."));
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeNameCaseSensitiveCompress) {
......@@ -138,8 +138,8 @@ TEST_F(MessageRendererTest, writeNameCaseSensitiveCompress) {
renderer.writeName(Name("a.example.com."));
renderer.writeName(Name("b.eXample.com."));
renderer.writeName(Name("c.eXample.com."));
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeNameMixedCaseCompress) {
......@@ -171,11 +171,10 @@ TEST_F(MessageRendererTest, writeRootName) {
renderer.writeName(Name("."));
renderer.writeName(example_name);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
static_cast<const uint8_t*>(renderer.getData()),
renderer.getLength(),
static_cast<const uint8_t*>(expected.getData()),
expected.getLength());
matchWireData(static_cast<const uint8_t*>(expected.getData()),
expected.getLength(),
static_cast<const uint8_t*>(renderer.getData()),
renderer.getLength());
}
TEST_F(MessageRendererTest, writeNameLabelSequence1) {
......@@ -192,8 +191,8 @@ TEST_F(MessageRendererTest, writeNameLabelSequence1) {
// example.com.
renderer.writeName(ls1);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeNameLabelSequence2) {
......@@ -207,8 +206,8 @@ TEST_F(MessageRendererTest, writeNameLabelSequence2) {
// a.example.com (without root .)
renderer.writeName(ls1);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, writeNameLabelSequence3) {
......@@ -235,8 +234,8 @@ TEST_F(MessageRendererTest, writeNameLabelSequence3) {
// example
renderer.writeName(ls1);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(MessageRendererTest, setBuffer) {
......
......@@ -25,6 +25,7 @@
#include <dns/messagerenderer.h>
#include <dns/tests/unittest_util.h>
#include <util/unittests/wiredata.h>
#include <gtest/gtest.h>
......@@ -32,6 +33,7 @@ using namespace std;
using namespace isc;
using namespace isc::dns;
using namespace isc::util;
using isc::util::unittests::matchWireData;
//
// XXX: these are defined as class static constants, but some compilers
......@@ -137,9 +139,8 @@ NameTest::compareInWireFormat(const Name& name_actual,
name_actual.toWire(buffer_actual);
name_expected.toWire(buffer_expected);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
buffer_actual.getData(), buffer_actual.getLength(),
buffer_expected.getData(), buffer_expected.getLength());
matchWireData(buffer_expected.getData(), buffer_expected.getLength(),
buffer_actual.getData(), buffer_actual.getLength());
}
TEST_F(NameTest, nonlocalObject) {
......@@ -512,8 +513,8 @@ TEST_F(NameTest, toWireBuffer) {
UnitTestUtil::readWireData(string("01610376697803636f6d00"), data);
Name("a.vix.com.").toWire(buffer);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, &data[0], data.size(),
buffer.getData(), buffer.getLength());
matchWireData(&data[0], data.size(),
buffer.getData(), buffer.getLength());
}
//
......@@ -526,8 +527,8 @@ TEST_F(NameTest, toWireRenderer) {
UnitTestUtil::readWireData(string("01610376697803636f6d00"), data);
Name("a.vix.com.").toWire(renderer);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, &data[0], data.size(),
renderer.getData(), renderer.getLength());
matchWireData(&data[0], data.size(),
renderer.getData(), renderer.getLength());
}
//
......@@ -686,9 +687,8 @@ TEST_F(NameTest, at) {
}
example_name.toWire(buffer_expected);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
&data[0], data.size(), buffer_expected.getData(),
buffer_expected.getLength());
matchWireData(&data[0], data.size(),
buffer_expected.getData(), buffer_expected.getLength());
// Out-of-range access: should trigger an exception.
EXPECT_THROW(example_name.at(example_name.getLength()), OutOfRange);
......
......@@ -28,11 +28,13 @@
#include <gtest/gtest.h>
#include <dns/tests/unittest_util.h>
#include <util/unittests/wiredata.h>
using isc::UnitTestUtil;
using namespace std;
using namespace isc::dns;
using namespace isc::util;
using isc::UnitTestUtil;
using isc::util::unittests::matchWireData;
namespace {
class QuestionTest : public ::testing::Test {
......@@ -100,16 +102,16 @@ TEST_F(QuestionTest, toWireBuffer) {
test_question1.toWire(obuffer);
test_question2.toWire(obuffer);
UnitTestUtil::readWireData("question_toWire1", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, obuffer.getData(),
obuffer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
obuffer.getData(), obuffer.getLength());
}
TEST_F(QuestionTest, toWireRenderer) {
test_question1.toWire(renderer);
test_question2.toWire(renderer);
UnitTestUtil::readWireData("question_toWire2", wiredata);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &wiredata[0], wiredata.size());
matchWireData(&wiredata[0], wiredata.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(QuestionTest, toWireTruncated) {
......
......@@ -24,12 +24,14 @@
#include <dns/tests/unittest_util.h>
#include <dns/tests/rdata_unittest.h>
#include <util/unittests/wiredata.h>
using isc::UnitTestUtil;
using namespace std;
using namespace isc::dns;
using namespace isc::util;
using namespace isc::dns::rdata;
using isc::UnitTestUtil;
using isc::util::unittests::matchWireData;
const char* const afsdb_text = "1 afsdb.example.com.";
const char* const afsdb_text2 = "0 root.example.com.";
......@@ -155,9 +157,8 @@ TEST_F(Rdata_AFSDB_Test, toWireBuffer) {
UnitTestUtil::readWireData("rdata_afsdb_toWire1.wire", expected_wire);
// then compare them
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
obuffer.getData(), obuffer.getLength(),
&expected_wire[0], expected_wire.size());
matchWireData(&expected_wire[0], expected_wire.size(),
obuffer.getData(), obuffer.getLength());
// clear buffer for the next test
obuffer.clear();
......@@ -170,9 +171,8 @@ TEST_F(Rdata_AFSDB_Test, toWireBuffer) {
UnitTestUtil::readWireData("rdata_afsdb_toWire2.wire", expected_wire);
// then compare them
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
obuffer.getData(), obuffer.getLength(),
&expected_wire[0], expected_wire.size());
matchWireData(&expected_wire[0], expected_wire.size(),
obuffer.getData(), obuffer.getLength());
}
TEST_F(Rdata_AFSDB_Test, toWireRenderer) {
......@@ -187,9 +187,8 @@ TEST_F(Rdata_AFSDB_Test, toWireRenderer) {
UnitTestUtil::readWireData("rdata_afsdb_toWire1.wire", expected_wire);
// then compare them
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
renderer.getData(), renderer.getLength(),
&expected_wire[0], expected_wire.size());
matchWireData(&expected_wire[0], expected_wire.size(),
renderer.getData(), renderer.getLength());
// clear renderer for the next test
renderer.clear();
......@@ -202,9 +201,8 @@ TEST_F(Rdata_AFSDB_Test, toWireRenderer) {
UnitTestUtil::readWireData("rdata_afsdb_toWire2.wire", expected_wire);
// then compare them
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
renderer.getData(), renderer.getLength(),
&expected_wire[0], expected_wire.size());
matchWireData(&expected_wire[0], expected_wire.size(),
renderer.getData(), renderer.getLength());
}
TEST_F(Rdata_AFSDB_Test, toText) {
......
......@@ -24,12 +24,14 @@
#include <dns/tests/unittest_util.h>
#include <dns/tests/rdata_unittest.h>
#include <util/unittests/wiredata.h>
using isc::UnitTestUtil;
using namespace std;
using namespace isc::dns;
using namespace isc::util;
using namespace isc::dns::rdata;
using isc::UnitTestUtil;
using isc::util::unittests::matchWireData;
namespace {
class Rdata_CNAME_Test : public RdataTest {
......@@ -115,20 +117,18 @@ TEST_F(Rdata_CNAME_Test, createFromLexer) {
TEST_F(Rdata_CNAME_Test, toWireBuffer) {
rdata_cname.toWire(obuffer);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
obuffer.getData(), obuffer.getLength(),
wiredata_cname, sizeof(wiredata_cname));
matchWireData(wiredata_cname, sizeof(wiredata_cname),
obuffer.getData(), obuffer.getLength());
}
TEST_F(Rdata_CNAME_Test, toWireRenderer) {
rdata_cname.toWire(renderer);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
renderer.getData(), renderer.getLength(),
wiredata_cname, sizeof(wiredata_cname));
matchWireData(wiredata_cname, sizeof(wiredata_cname),
renderer.getData(), renderer.getLength());
rdata_cname2.toWire(renderer);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
renderer.getData(), renderer.getLength(),
wiredata_cname2, sizeof(wiredata_cname2));
matchWireData(wiredata_cname2, sizeof(wiredata_cname2),
renderer.getData(), renderer.getLength());
}
TEST_F(Rdata_CNAME_Test, toText) {
......
......@@ -22,14 +22,16 @@
#include <dns/tests/unittest_util.h>
#include <dns/tests/rdata_unittest.h>
#include <util/unittests/wiredata.h>
using isc::UnitTestUtil;
using namespace std;
using namespace isc;
using namespace isc::dns;
using namespace isc::util;
using namespace isc::util::encode;
using namespace isc::dns::rdata;
using isc::UnitTestUtil;
using isc::util::unittests::matchWireData;
namespace {
......@@ -125,8 +127,8 @@ TEST_F(Rdata_DHCID_Test, toWireRenderer) {
vector<unsigned char> data;
UnitTestUtil::readWireData("rdata_dhcid_toWire", data);
EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData, renderer.getData(),
renderer.getLength(), &data[0], data.size());
matchWireData(&data[0], data.size(),