Skip to content

Commit 4424d57

Browse files
Al2Klimovyhabteab
andcommitted
Tests: config_apply/gettargetservices_*: use BOOST_CHECK_EQUAL_COLLECTIONS()
to show the value diff in case of mismatch. Co-authored-by: Yonas Habteab <[email protected]>
1 parent 191bf93 commit 4424d57

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/config-apply.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ static Expression* RequireActualExpression(const std::unique_ptr<Expression>& co
2222
return sub0;
2323
}
2424

25+
template<>
26+
struct boost::test_tools::tt_detail::print_log_value<std::pair<String, String>>
27+
{
28+
inline void operator()(std::ostream& os, const std::pair<String, String>& hs)
29+
{
30+
os << hs.first << "!" << hs.second;
31+
}
32+
};
33+
2534
static void GetTargetHostsHelper(
2635
const String& filter, const Dictionary::Ptr& constants, bool targeted, const std::vector<String>& hosts = {}
2736
)
@@ -64,7 +73,7 @@ static void GetTargetServicesHelper(
6473
actualServiceNames.emplace_back(*s.first, *s.second);
6574
}
6675

67-
BOOST_CHECK(actualServiceNames == services);
76+
BOOST_CHECK_EQUAL_COLLECTIONS(actualServiceNames.begin(), actualServiceNames.end(), services.begin(), services.end());
6877
}
6978
}
7079

0 commit comments

Comments
 (0)