[ox/std] Add UUID str conv test and fix bugs found

This commit is contained in:
2023-02-12 20:38:29 -06:00
parent 1b7b6e306e
commit 54eebf81da
4 changed files with 36 additions and 15 deletions

View File

@@ -197,6 +197,16 @@ static std::map<ox::String, ox::Error(*)()> tests = {
oxExpect(ox::detail::toHex(0x0f), "0f");
oxExpect(ox::detail::toHex(0x93), "93");
oxExpect(ox::detail::toHex(0x40), "40");
oxExpect(ox::detail::toHex(0xf0), "f0");
return OxError(0);
}
},
{
"UUID",
[] {
constexpr ox::StringView uuidStr = "8d814442-f46e-4cc3-8edc-ca3c01cc86db";
oxRequire(uuid, ox::UUID::fromString(uuidStr));
oxExpect(ox::StringView(uuid.toString()), uuidStr);
return OxError(0);
}
},