2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[2432] Minimize code

This commit is contained in:
Mukund Sivaraman
2013-01-07 14:32:35 +05:30
parent 004823862f
commit 35d02013f2

View File

@@ -125,19 +125,16 @@ doAddAndRemove(RRsetCollection& collection, const RRClass& rrclass) {
}, isc::InvalidParameter);
// Remove foo.example.org/A, which should pass
bool exists = collection.removeRRset(Name("foo.example.org"),
rrclass, RRType::A());
EXPECT_TRUE(exists);
EXPECT_TRUE(collection.removeRRset(Name("foo.example.org"),
rrclass, RRType::A()));
// foo.example.org/A should not exist now
rrset_found = collection.find(Name("foo.example.org"), rrclass,
RRType::A());
EXPECT_FALSE(rrset_found);
// Removing foo.example.org/A should fail now
exists = collection.removeRRset(Name("foo.example.org"),
rrclass, RRType::A());
EXPECT_FALSE(exists);
EXPECT_FALSE(collection.removeRRset(Name("foo.example.org"),
rrclass, RRType::A()));
}
TEST_F(RRsetCollectionTest, addAndRemove) {