summaryrefslogtreecommitdiff
path: root/test/ares-test-parse-naptr.cc
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2022-01-12 15:55:57 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2022-01-12 15:55:57 +0900
commit6c5282d154e7f4423b6bfdbbb9e4318f2fcb47bf (patch)
tree8a7b776eed444cb0040de9d3f490e80675f5daaa /test/ares-test-parse-naptr.cc
parenta3808d2c148f36c332625d958a80b7380de9d3a2 (diff)
parent450be02682da219c984870e56ac2c3098efbe68a (diff)
downloadc-ares-6c5282d154e7f4423b6bfdbbb9e4318f2fcb47bf.tar.gz
c-ares-6c5282d154e7f4423b6bfdbbb9e4318f2fcb47bf.tar.bz2
c-ares-6c5282d154e7f4423b6bfdbbb9e4318f2fcb47bf.zip
Change-Id: I78d0446c9b8a29e5a5acd91c5399bc89736ca168
Diffstat (limited to 'test/ares-test-parse-naptr.cc')
-rw-r--r--test/ares-test-parse-naptr.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/ares-test-parse-naptr.cc b/test/ares-test-parse-naptr.cc
index 3238a19..aa1a2a5 100644
--- a/test/ares-test-parse-naptr.cc
+++ b/test/ares-test-parse-naptr.cc
@@ -10,7 +10,7 @@ namespace test {
TEST_F(LibraryTest, ParseNaptrReplyOK) {
DNSPacket pkt;
pkt.set_qid(0x1234).set_response().set_aa()
- .add_question(new DNSQuestion("example.com", ns_t_naptr))
+ .add_question(new DNSQuestion("example.com", T_NAPTR))
.add_answer(new DNSNaptrRR("example.com", 100,
10, 20, "SP", "service", "regexp", "replace"))
.add_answer(new DNSNaptrRR("example.com", 0x0010,
@@ -43,7 +43,7 @@ TEST_F(LibraryTest, ParseNaptrReplyOK) {
TEST_F(LibraryTest, ParseNaptrReplyErrors) {
DNSPacket pkt;
pkt.set_qid(0x1234).set_response().set_aa()
- .add_question(new DNSQuestion("example.com", ns_t_naptr))
+ .add_question(new DNSQuestion("example.com", T_NAPTR))
.add_answer(new DNSNaptrRR("example.com", 100,
10, 20, "SP", "service", "regexp", "replace"));
std::vector<byte> data;
@@ -53,24 +53,24 @@ TEST_F(LibraryTest, ParseNaptrReplyErrors) {
pkt.questions_.clear();
data = pkt.data();
EXPECT_EQ(ARES_EBADRESP, ares_parse_naptr_reply(data.data(), data.size(), &naptr));
- pkt.add_question(new DNSQuestion("example.com", ns_t_naptr));
+ pkt.add_question(new DNSQuestion("example.com", T_NAPTR));
#ifdef DISABLED
// Question != answer
pkt.questions_.clear();
- pkt.add_question(new DNSQuestion("Axample.com", ns_t_naptr));
+ pkt.add_question(new DNSQuestion("Axample.com", T_NAPTR));
data = pkt.data();
EXPECT_EQ(ARES_ENODATA, ares_parse_naptr_reply(data.data(), data.size(), &naptr));
pkt.questions_.clear();
- pkt.add_question(new DNSQuestion("example.com", ns_t_naptr));
+ pkt.add_question(new DNSQuestion("example.com", T_NAPTR));
#endif
// Two questions
- pkt.add_question(new DNSQuestion("example.com", ns_t_naptr));
+ pkt.add_question(new DNSQuestion("example.com", T_NAPTR));
data = pkt.data();
EXPECT_EQ(ARES_EBADRESP, ares_parse_naptr_reply(data.data(), data.size(), &naptr));
pkt.questions_.clear();
- pkt.add_question(new DNSQuestion("example.com", ns_t_naptr));
+ pkt.add_question(new DNSQuestion("example.com", T_NAPTR));
// Wrong sort of answer.
pkt.answers_.clear();
@@ -129,7 +129,7 @@ TEST_F(LibraryTest, ParseNaptrReplyTooShort) {
TEST_F(LibraryTest, ParseNaptrReplyAllocFail) {
DNSPacket pkt;
pkt.set_qid(0x1234).set_response().set_aa()
- .add_question(new DNSQuestion("example.com", ns_t_naptr))
+ .add_question(new DNSQuestion("example.com", T_NAPTR))
.add_answer(new DNSNaptrRR("example.com", 100,
10, 20, "SP", "service", "regexp", "replace"))
.add_answer(new DNSNaptrRR("example.com", 0x0010,