]>
Commit | Line | Data |
---|---|---|
4ee48a74 PL |
1 | #define BOOST_TEST_DYN_LINK |
2 | #define BOOST_TEST_NO_MAIN | |
3 | #ifdef HAVE_CONFIG_H | |
4 | #include "config.h" | |
5 | #endif | |
6 | #include <boost/test/unit_test.hpp> | |
7 | #include "dnsparser.hh" | |
8 | ||
9 | BOOST_AUTO_TEST_SUITE(test_dnsparser_hh) | |
10 | ||
11 | BOOST_AUTO_TEST_CASE(test_type_lowercase) { | |
12 | std::string lc("type12345"); | |
13 | std::string uc("TYPE12345"); | |
14 | ||
15 | uint16_t lc_result = DNSRecordContent::TypeToNumber(lc); | |
16 | uint16_t uc_result = DNSRecordContent::TypeToNumber(uc); | |
17 | BOOST_CHECK_EQUAL(lc_result, 12345); | |
18 | BOOST_CHECK_EQUAL(lc_result, uc_result); | |
19 | } | |
20 | ||
21 | BOOST_AUTO_TEST_SUITE_END() |