From d46d8385ab68fd8f902016b3e7406290cb46c0db Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Nov 2023 13:12:24 +0000 Subject: Reformat test source --- test/test-persistence.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/test-persistence.cpp') diff --git a/test/test-persistence.cpp b/test/test-persistence.cpp index 38bbf2f..abb68c2 100644 --- a/test/test-persistence.cpp +++ b/test/test-persistence.cpp @@ -26,6 +26,7 @@ struct JPP { BOOST_REQUIRE(to); return to; } + // Presumably BOOST_TEST_CONTEXT is implemented as an if (...) { } throw std::logic_error("We shouldn't ever get here, but apparently we can!"); } @@ -213,6 +214,7 @@ auto const TEST_STRINGS_DECODE_ONLY = boost::unit_test::data::make({ {R"J("\u056b ARMENIAN SMALL LETTER INI")J", "ի ARMENIAN SMALL LETTER INI"}, {R"J("\u0833 SAMARITAN PUNCTUATION BAU")J", "࠳ SAMARITAN PUNCTUATION BAU"}, }); + BOOST_DATA_TEST_CASE(load_strings, TEST_STRINGS + TEST_STRINGS_DECODE_ONLY, in, exp) { std::stringstream str {in}; @@ -220,6 +222,7 @@ BOOST_DATA_TEST_CASE(load_strings, TEST_STRINGS + TEST_STRINGS_DECODE_ONLY, in, } using cpstr = std::tuple; + BOOST_DATA_TEST_CASE(utf8_decode, boost::unit_test::data::make({ {9, "\t"}, @@ -296,6 +299,7 @@ BOOST_AUTO_TEST_CASE(get_default_id) { SubObject2 so; const auto id {so.getId()}; + BOOST_TEST_CONTEXT(id) { auto ptr = std::stoul(id, nullptr, 16); BOOST_CHECK_EQUAL(ptr, reinterpret_cast(&so)); -- cgit v1.2.3