1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Fixed id ostream operator to print human readable ids

This commit is contained in:
Teemu Ollakka
2022-01-03 11:19:58 +02:00
parent 5754f2a0a0
commit e372dcbecb
2 changed files with 14 additions and 2 deletions

View File

@ -37,6 +37,15 @@ BOOST_AUTO_TEST_CASE(id_test_uuid)
}
BOOST_AUTO_TEST_CASE(id_test_string)
{
std::string id_str("node1");
wsrep::id id(id_str);
std::ostringstream os;
os << id;
BOOST_REQUIRE(id_str == os.str());
}
BOOST_AUTO_TEST_CASE(id_test_string_max)
{
std::string id_str("1234567890123456");
wsrep::id id(id_str);