Commit a902e5f1 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

corrected RR class for the static data source.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1192 e5f2f494-b856-4b98-b285-d166d9295462
parent cc1498e0
...@@ -132,35 +132,35 @@ TEST_F(StaticDataSourceTest, close) { ...@@ -132,35 +132,35 @@ TEST_F(StaticDataSourceTest, close) {
TEST_F(StaticDataSourceTest, findClosestEnclosureForVersion) { TEST_F(StaticDataSourceTest, findClosestEnclosureForVersion) {
NameMatch name_match(version_name); NameMatch name_match(version_name);
data_source.findClosestEnclosure(name_match, RRClass::IN()); data_source.findClosestEnclosure(name_match, rrclass);
EXPECT_EQ(version_name, *name_match.closestName()); EXPECT_EQ(version_name, *name_match.closestName());
EXPECT_EQ(&data_source, name_match.bestDataSrc()); EXPECT_EQ(&data_source, name_match.bestDataSrc());
} }
TEST_F(StaticDataSourceTest, findClosestEnclosureForVersionPartial) { TEST_F(StaticDataSourceTest, findClosestEnclosureForVersionPartial) {
NameMatch name_match(Name("foo").concatenate(version_name)); NameMatch name_match(Name("foo").concatenate(version_name));
data_source.findClosestEnclosure(name_match, RRClass::IN()); data_source.findClosestEnclosure(name_match, rrclass);
EXPECT_EQ(version_name, *name_match.closestName()); EXPECT_EQ(version_name, *name_match.closestName());
EXPECT_EQ(&data_source, name_match.bestDataSrc()); EXPECT_EQ(&data_source, name_match.bestDataSrc());
} }
TEST_F(StaticDataSourceTest, findClosestEnclosureForAuthors) { TEST_F(StaticDataSourceTest, findClosestEnclosureForAuthors) {
NameMatch name_match(authors_name); NameMatch name_match(authors_name);
data_source.findClosestEnclosure(name_match, RRClass::IN()); data_source.findClosestEnclosure(name_match, rrclass);
EXPECT_EQ(authors_name, *name_match.closestName()); EXPECT_EQ(authors_name, *name_match.closestName());
EXPECT_EQ(&data_source, name_match.bestDataSrc()); EXPECT_EQ(&data_source, name_match.bestDataSrc());
} }
TEST_F(StaticDataSourceTest, findClosestEnclosureForAuthorsPartial) { TEST_F(StaticDataSourceTest, findClosestEnclosureForAuthorsPartial) {
NameMatch name_match(Name("foo").concatenate(authors_name)); NameMatch name_match(Name("foo").concatenate(authors_name));
data_source.findClosestEnclosure(name_match, RRClass::IN()); data_source.findClosestEnclosure(name_match, rrclass);
EXPECT_EQ(authors_name, *name_match.closestName()); EXPECT_EQ(authors_name, *name_match.closestName());
EXPECT_EQ(&data_source, name_match.bestDataSrc()); EXPECT_EQ(&data_source, name_match.bestDataSrc());
} }
TEST_F(StaticDataSourceTest, findClosestEnclosureNoMatch) { TEST_F(StaticDataSourceTest, findClosestEnclosureNoMatch) {
NameMatch name_match(nomatch_name); NameMatch name_match(nomatch_name);
data_source.findClosestEnclosure(name_match, RRClass::IN()); data_source.findClosestEnclosure(name_match, rrclass);
EXPECT_EQ(NULL, name_match.closestName()); EXPECT_EQ(NULL, name_match.closestName());
EXPECT_EQ(NULL, name_match.bestDataSrc()); EXPECT_EQ(NULL, name_match.bestDataSrc());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment