From 222640267598e1b762ba66f9440c860516ea295c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20B=C3=BChler?= Date: Thu, 28 Dec 2017 22:37:49 +0100 Subject: [PATCH] test-dnsrecords: simplify CASE_L to CASE_S when inval == zoneval --- pdns/test-dnsrecords_cc.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pdns/test-dnsrecords_cc.cc b/pdns/test-dnsrecords_cc.cc index df4102a4f..70d7af459 100644 --- a/pdns/test-dnsrecords_cc.cc +++ b/pdns/test-dnsrecords_cc.cc @@ -41,11 +41,11 @@ BOOST_AUTO_TEST_CASE(test_record_types) { cases_t cases = boost::assign::list_of (CASE_S(QType::A, "127.0.0.1", "\x7F\x00\x00\x01",false)) // local nameserver - (CASE_L(QType::NS, "ns.rec.test.", "ns.rec.test.", "\x02ns\xc0\x11",false)) + (CASE_S(QType::NS, "ns.rec.test.", "\x02ns\xc0\x11",false)) // non-local nameserver (CASE_S(QType::NS, "ns.example.com.", "\x02ns\x07""example\x03""com\x00",false)) // local alias - (CASE_L(QType::CNAME, "name.rec.test.", "name.rec.test.", "\x04name\xc0\x11",false)) + (CASE_S(QType::CNAME, "name.rec.test.", "\x04name\xc0\x11",false)) // non-local alias (CASE_S(QType::CNAME, "name.example.com.", "\x04name\x07""example\x03""com\x00",false)) // max label length (63) @@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(test_record_types) { // local names (CASE_S(QType::SOA, "ns.rec.test. hostmaster.test.rec. 2013051201 3600 3600 604800 120", "\x02ns\xc0\x11\x0ahostmaster\x04test\x03rec\x00\x77\xfc\xb9\x41\x00\x00\x0e\x10\x00\x00\x0e\x10\x00\x09\x3a\x80\x00\x00\x00\x78",false)) // local name without dots - (CASE_L(QType::SOA, "ns.rec.test. hostmaster.test.rec. 2013051201 3600 3600 604800 120", "ns.rec.test. hostmaster.test.rec. 2013051201 3600 3600 604800 120", "\x02ns\xc0\x11\x0ahostmaster\x04test\x03rec\x00\x77\xfc\xb9\x41\x00\x00\x0e\x10\x00\x00\x0e\x10\x00\x09\x3a\x80\x00\x00\x00\x78",false)) + (CASE_S(QType::SOA, "ns.rec.test. hostmaster.test.rec. 2013051201 3600 3600 604800 120", "\x02ns\xc0\x11\x0ahostmaster\x04test\x03rec\x00\x77\xfc\xb9\x41\x00\x00\x0e\x10\x00\x00\x0e\x10\x00\x09\x3a\x80\x00\x00\x00\x78",false)) // non-local names (CASE_S(QType::SOA, "ns.example.com. hostmaster.example.com. 2013051201 3600 3600 604800 120", "\x02ns\x07""example\x03""com\x00\x0ahostmaster\xc0\x28\x77\xfc\xb9\x41\x00\x00\x0e\x10\x00\x00\x0e\x10\x00\x09\x3a\x80\x00\x00\x00\x78",false)) @@ -68,9 +68,9 @@ BOOST_AUTO_TEST_CASE(test_record_types) { (CASE_S(QType::MR, "newmailbox.example.com.", "\x0anewmailbox\x07""example\x03""com\x00",false)) // local name - (CASE_L(QType::PTR, "ptr.rec.test.", "ptr.rec.test.", "\x03ptr\xc0\x11",false)) + (CASE_S(QType::PTR, "ptr.rec.test.", "\x03ptr\xc0\x11",false)) // non-local name - (CASE_L(QType::PTR, "ptr.example.com.", "ptr.example.com.", "\x03ptr\x07""example\x03""com\x00",false)) + (CASE_S(QType::PTR, "ptr.example.com.", "\x03ptr\x07""example\x03""com\x00",false)) (CASE_S(QType::HINFO, "\"i686\" \"Linux\"", "\x04i686\x05Linux",false)) (CASE_L(QType::HINFO, "i686 \"Linux\"", "\"i686\" \"Linux\"", "\x04i686\x05Linux",true)) (CASE_L(QType::HINFO, "\"i686\" Linux", "\"i686\" \"Linux\"", "\x04i686\x05Linux",false)) @@ -85,9 +85,9 @@ BOOST_AUTO_TEST_CASE(test_record_types) { (CASE_S(QType::TXT, "\"short text\"", "\x0ashort text",false)) (CASE_S(QType::TXT, "\"long record test 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\" \"2222222222\"", "\xff""long record test 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\x0a""2222222222",false)) (CASE_L(QType::TXT, "\"long record test 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222\"", "\"long record test 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\" \"2222222222\"", "\xff""long record test 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\x0a""2222222222",false)) - (CASE_L(QType::TXT, "\"\\195\\133LAND ISLANDS\"", "\"\\195\\133LAND ISLANDS\"", "\x0e\xc3\x85LAND ISLANDS", false)) + (CASE_S(QType::TXT, "\"\\195\\133LAND ISLANDS\"", "\x0e\xc3\x85LAND ISLANDS", false)) (CASE_L(QType::TXT, "\"\xc3\x85LAND ISLANDS\"", "\"\\195\\133LAND ISLANDS\"", "\x0e\xc3\x85LAND ISLANDS", false)) - (CASE_L(QType::TXT, "\"nonbreakingtxt\"", "\"nonbreakingtxt\"", "\x0enonbreakingtxt",false)) + (CASE_S(QType::TXT, "\"nonbreakingtxt\"", "\x0enonbreakingtxt",false)) // local name (CASE_S(QType::RP, "admin.rec.test. admin-info.rec.test.", "\x05""admin\x03rec\x04test\x00\x0a""admin-info\x03rec\x04test\x00",false)) // non-local name -- 2.49.0