This commit is contained in:
Branimir Karadžić
2018-02-22 15:45:42 -08:00
parent e0b537c5af
commit d0e2be1755
3 changed files with 21 additions and 10 deletions

View File

@@ -19,6 +19,16 @@ TEST_CASE("stringPrintfTy", "")
REQUIRE(0 == bx::strCmp(bx::StringView(test), "printf into std::string.") );
}
TEST_CASE("prettify", "")
{
char tmp[1024];
prettify(tmp, BX_COUNTOF(tmp), 4000, bx::Units::Kilo);
REQUIRE(0 == bx::strCmp(tmp, "4.00 kB") );
prettify(tmp, BX_COUNTOF(tmp), 4096, bx::Units::Kibi);
REQUIRE(0 == bx::strCmp(tmp, "4.00 KiB") );
}
TEST_CASE("chars", "")
{
for (char ch = 'A'; ch <= 'Z'; ++ch)