diff --git a/atdna/test.cpp b/atdna/test.cpp index f23c929..ede95de 100644 --- a/atdna/test.cpp +++ b/atdna/test.cpp @@ -1,5 +1,7 @@ #include "test.hpp" -#include "athena/MemoryWriter.hpp" + +#include +#include #define EXPECTED_BYTES 281 @@ -13,11 +15,14 @@ int main(int argc, const char** argv) { athena::io::MemoryCopyWriter w(nullptr, binSize); atInt64 pos = w.position(); file.write(w); - bool pass = !w.hasError() && w.position() - pos == binSize && binSize == EXPECTED_BYTES; - if (pass) - printf("[PASS] %" PRISize " bytes written\n", size_t(w.position() - pos)); - else - printf("[FAIL] %" PRISize " bytes written; %" PRISize " bytes sized; %d bytes expected\n", - size_t(w.position() - pos), binSize, EXPECTED_BYTES); + + const bool pass = !w.hasError() && w.position() - pos == binSize && binSize == EXPECTED_BYTES; + if (pass) { + fmt::print(fmt("[PASS] {} bytes written\n"), size_t(w.position() - pos)); + } else { + fmt::print(fmt("[FAIL] {} bytes written; {} bytes sized; {} bytes expected\n"), size_t(w.position() - pos), binSize, + EXPECTED_BYTES); + } + return pass ? 0 : 1; }