[ox/claw] Add readClawHeader to public API
This commit is contained in:
4
deps/ox/src/ox/claw/test/tests.cpp
vendored
4
deps/ox/src/ox/claw/test/tests.cpp
vendored
@ -108,7 +108,7 @@ std::map<std::string_view, ox::Error(*)()> tests = {
|
||||
"ClawHeaderReader",
|
||||
[] {
|
||||
ox::String hdr = "O1;com.drinkingtea.ox.claw.test.Header;2;";
|
||||
auto [ch, err] = ox::detail::readHeader(hdr.c_str(), hdr.len() + 1);
|
||||
auto [ch, err] = ox::readClawHeader(hdr.c_str(), hdr.len() + 1);
|
||||
oxAssert(err, "Error parsing header");
|
||||
oxAssert(ch.fmt == ox::ClawFormat::Organic, "Format wrong");
|
||||
oxAssert(ch.typeName == "com.drinkingtea.ox.claw.test.Header", "Type name wrong");
|
||||
@ -120,7 +120,7 @@ std::map<std::string_view, ox::Error(*)()> tests = {
|
||||
"ClawHeaderReader2",
|
||||
[] {
|
||||
ox::String hdr = "M1;com.drinkingtea.ox.claw.test.Header2;3;";
|
||||
auto [ch, err] = ox::detail::readHeader(hdr.c_str(), hdr.len() + 1);
|
||||
auto [ch, err] = ox::readClawHeader(hdr.c_str(), hdr.len() + 1);
|
||||
oxAssert(err, "Error parsing header");
|
||||
oxAssert(ch.fmt == ox::ClawFormat::Metal, "Format wrong");
|
||||
oxAssert(ch.typeName == "com.drinkingtea.ox.claw.test.Header2", "Type name wrong");
|
||||
|
Reference in New Issue
Block a user