link: simplify with DelegationList
refs #4055
Change-Id: Id8280037beb7d128cda8faa8ed1ed21e2209ba97
diff --git a/tests/unit-tests/delegation-list.t.cpp b/tests/unit-tests/delegation-list.t.cpp
index 5961af5..b98c67a 100644
--- a/tests/unit-tests/delegation-list.t.cpp
+++ b/tests/unit-tests/delegation-list.t.cpp
@@ -181,8 +181,7 @@
BOOST_AUTO_TEST_CASE(InsertReplace)
{
- DelegationList dl;
- dl.insert(2, "/A");
+ DelegationList dl({{2, "/A"}});
dl.insert(Delegation{1, "/A"}, DelegationList::INS_REPLACE);
BOOST_CHECK_EQUAL(dl.size(), 1);
BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
@@ -195,8 +194,7 @@
BOOST_AUTO_TEST_CASE(InsertAppend)
{
- DelegationList dl;
- dl.insert(2, "/A");
+ DelegationList dl({{2, "/A"}});
dl.insert(Delegation{1, "/A"}, DelegationList::INS_APPEND);
BOOST_CHECK_EQUAL(dl.size(), 2);
BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
@@ -209,8 +207,7 @@
BOOST_AUTO_TEST_CASE(InsertSkip)
{
- DelegationList dl;
- dl.insert(2, "/A");
+ DelegationList dl({{2, "/A"}});
dl.insert(Delegation{1, "/A"}, DelegationList::INS_SKIP);
BOOST_CHECK_EQUAL(dl.size(), 1);
BOOST_CHECK_EQUAL(dl.at(0).preference, 2);