Commit b5735838 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2432] Move addAndRemove test code to a helper method

parent e4a823ad
......@@ -104,7 +104,8 @@ TEST_F(RRsetCollectionTest, find) {
doFind<RRsetCollection, RRsetPtr>(collection, rrclass);
}
TEST_F(RRsetCollectionTest, addAndRemove) {
void
doAddAndRemove(RRsetCollection& collection, const RRClass& rrclass) {
// foo.example.org/A doesn't exist
RRsetPtr rrset_found = collection.find(Name("foo.example.org"), rrclass,
RRType::A());
......@@ -134,6 +135,10 @@ TEST_F(RRsetCollectionTest, addAndRemove) {
EXPECT_FALSE(rrset_found);
}
TEST_F(RRsetCollectionTest, addAndRemove) {
doAddAndRemove(collection, rrclass);
}
TEST_F(RRsetCollectionTest, iteratorTest) {
// The collection must not be empty.
RRsetCollection::iterator iter = collection.begin();
......
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