[ox/claw] Test cleanup

This commit is contained in:
Gary Talent 2023-12-04 00:26:08 -06:00
parent b61f81abf0
commit 7d9a1676e8

View File

@ -108,7 +108,7 @@ static std::map<ox::StringView, ox::Error(*)()> tests = {
{
"ClawHeaderReader",
[] {
ox::String hdr("O1;com.drinkingtea.ox.claw.test.Header;2;");
constexpr auto hdr = ox::StringLiteral("O1;com.drinkingtea.ox.claw.test.Header;2;");
auto [ch, err] = ox::readClawHeader(hdr.c_str(), hdr.len() + 1);
oxAssert(err, "Error parsing header");
oxAssert(ch.fmt == ox::ClawFormat::Organic, "Format wrong");
@ -120,7 +120,7 @@ static std::map<ox::StringView, ox::Error(*)()> tests = {
{
"ClawHeaderReader2",
[] {
ox::String hdr("M2;com.drinkingtea.ox.claw.test.Header2;3;");
constexpr auto hdr = ox::StringLiteral("M2;com.drinkingtea.ox.claw.test.Header2;3;");
auto [ch, err] = ox::readClawHeader(hdr.c_str(), hdr.len() + 1);
oxAssert(err, "Error parsing header");
oxAssert(ch.fmt == ox::ClawFormat::Metal, "Format wrong");