Skip to content

Commit

Permalink
Tests: config_apply/gettargetservices_*: use BOOST_CHECK_EQUAL_COLLEC…
Browse files Browse the repository at this point in the history
…TIONS()

to show the value diff in case of mismatch.

Co-authored-by: Yonas Habteab <[email protected]>
  • Loading branch information
Al2Klimov and yhabteab committed Dec 18, 2023
1 parent 191bf93 commit 4424d57
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/config-apply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ static Expression* RequireActualExpression(const std::unique_ptr<Expression>& co
return sub0;
}

template<>
struct boost::test_tools::tt_detail::print_log_value<std::pair<String, String>>
{
inline void operator()(std::ostream& os, const std::pair<String, String>& hs)
{
os << hs.first << "!" << hs.second;
}
};

static void GetTargetHostsHelper(
const String& filter, const Dictionary::Ptr& constants, bool targeted, const std::vector<String>& hosts = {}
)
Expand Down Expand Up @@ -64,7 +73,7 @@ static void GetTargetServicesHelper(
actualServiceNames.emplace_back(*s.first, *s.second);
}

BOOST_CHECK(actualServiceNames == services);
BOOST_CHECK_EQUAL_COLLECTIONS(actualServiceNames.begin(), actualServiceNames.end(), services.begin(), services.end());
}
}

Expand Down

0 comments on commit 4424d57

Please sign in to comment.