/* * Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved. */ #undef NDEBUG #include #include #include #include using namespace nostalgia; static std::map tests = { { "readWriteTileSheet", []() -> ox::Error { core::TileSheet in; oxRequire(buff, ox::writeMC(in)); oxRequire(out, ox::readMC(buff)); oxAssert(in.subsheet.name == out.subsheet.name, "subsheet.name serialization broken"); return {}; } }, }; int main(int argc, const char **args) { int retval = -1; if (argc > 0) { auto const testName = ox::StringView(args[1]); if (tests.find(testName) != tests.end()) { retval = static_cast(tests[testName]()); } else { retval = 1; } } return retval; }