test/boost/auth_resource_test.cc: do not rely on templated operator<<

This change is intended to remove the dependency to
operator<<(std::ostream&, const std::unordered_set<T>&)
from auth_resource_test.cc.

It prepares the test for removal of the templated helpers
from utils/to_string.hh, which is one of goals of the
referenced issue that is linked below.

Refs: #13245

Signed-off-by: Patryk Wrobel <patryk.wrobel@scylladb.com>

Closes scylladb/scylladb#16754
This commit is contained in:
Patryk Wrobel
2024-01-11 22:16:42 +01:00
committed by Botond Dénes
parent b69f7126c3
commit 87545e40c7

View File

@@ -10,19 +10,21 @@
#include "auth/resource.hh"
#include <sstream>
#include <boost/test/unit_test.hpp>
#include "utils/to_string.hh"
#include <fmt/ranges.h>
namespace auth {
std::ostream& operator<<(std::ostream& os, resource_kind kind) {
std::ostream& boost_test_print_type(std::ostream& os, const resource_kind& kind) {
fmt::print(os, "{}", kind);
return os;
}
std::ostream& boost_test_print_type(std::ostream& os, const resource_set& resources) {
fmt::print(os, "{}", resources);
return os;
}
}
BOOST_AUTO_TEST_CASE(root_of) {