From: Mukund Sivaraman Date: Mon, 3 Dec 2012 23:14:34 +0000 (+0530) Subject: [2497] Add a direct HINFO testcase for the string parser X-Git-Tag: bind10-1.0.0-beta-release~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec24cb1c279c83107c9058cbdbd9115d84d3ea71;p=thirdparty%2Fkea.git [2497] Add a direct HINFO testcase for the string parser --- diff --git a/src/lib/dns/tests/rdata_hinfo_unittest.cc b/src/lib/dns/tests/rdata_hinfo_unittest.cc index 005563935d..f592066b6f 100644 --- a/src/lib/dns/tests/rdata_hinfo_unittest.cc +++ b/src/lib/dns/tests/rdata_hinfo_unittest.cc @@ -41,6 +41,7 @@ static uint8_t hinfo_rdata[] = {0x07,0x50,0x65,0x6e,0x74,0x69,0x75,0x6d,0x05, static const char *hinfo_str = "\"Pentium\" \"Linux\""; static const char *hinfo_str1 = "\"Pen\\\"tium\" \"Linux\""; +static const char *hinfo_str_equal = "\"Pentium\"\"Linux\""; static const char *hinfo_str_small1 = "\"Lentium\" \"Linux\""; static const char *hinfo_str_small2 = "\"Pentium\" \"Kinux\""; static const char *hinfo_str_large1 = "\"Qentium\" \"Linux\""; @@ -127,6 +128,7 @@ TEST_F(Rdata_HINFO_Test, compare) { HINFO hinfo_large2(hinfo_str_large2); EXPECT_EQ(0, hinfo.compare(HINFO(hinfo_str))); + EXPECT_EQ(0, hinfo.compare(HINFO(hinfo_str_equal))); EXPECT_EQ(1, hinfo.compare(HINFO(hinfo_str_small1))); EXPECT_EQ(1, hinfo.compare(HINFO(hinfo_str_small2))); EXPECT_EQ(-1, hinfo.compare(HINFO(hinfo_str_large1)));