[ox] Cleanup serialization writers, make MC and Claw use Writer_c
This commit is contained in:
16
deps/ox/src/ox/std/test/tests.cpp
vendored
16
deps/ox/src/ox/std/test/tests.cpp
vendored
@@ -25,6 +25,22 @@ static std::map<ox::String, ox::Error(*)()> tests = {
|
||||
return OxError(0);
|
||||
}
|
||||
},
|
||||
{
|
||||
"itoa",
|
||||
[]() {
|
||||
ox::Array<char, 10> buff;
|
||||
ox::CharBuffWriter bw(buff);
|
||||
oxAssert(ox::itoa(5, bw), "ox::itoa returned Error");
|
||||
oxExpect(ox::StringView(buff.data()), ox::StringView("5"));
|
||||
oxReturnError(bw.seekp(0));
|
||||
oxAssert(ox::itoa(50, bw), "ox::itoa returned Error");
|
||||
oxExpect(ox::StringView(buff.data()), ox::StringView("50"));
|
||||
oxReturnError(bw.seekp(0));
|
||||
oxAssert(ox::itoa(500, bw), "ox::itoa returned Error");
|
||||
oxExpect(ox::StringView(buff.data()), ox::StringView("500"));
|
||||
return ox::Error{};
|
||||
}
|
||||
},
|
||||
{
|
||||
"ABCDEFG != HIJKLMN",
|
||||
[]() {
|
||||
|
||||
Reference in New Issue
Block a user