refactor: fixed_string refactored to reflect the latest changes to P3094R1

This commit is contained in:
Mateusz Pusz
2024-03-18 22:50:35 +09:00
parent 02dc42738f
commit 16f4f5d4a8
5 changed files with 53 additions and 28 deletions
+12
View File
@@ -46,6 +46,18 @@ inline constexpr bool mp_units::is_vector<T> = true;
using namespace mp_units;
using namespace mp_units::si::unit_symbols;
TEST_CASE("fixed_string", "[text][ostream][fmt]")
{
basic_fixed_string txt = "units";
SECTION("iostream")
{
std::ostringstream os;
os << txt;
CHECK(os.str() == "units");
}
SECTION("fmt") { CHECK(MP_UNITS_STD_FMT::format("{}", txt) == "units"); }
}
TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]")
{
std::ostringstream os;