We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dbb1be commit 0105600Copy full SHA for 0105600
Tests/AK/TestNumberFormat.cpp
@@ -125,3 +125,11 @@ TEST_CASE(extremes_8byte)
125
warnln("(Skipping 8-byte-size_t test on 32-bit platform)");
126
}
127
128
+
129
+TEST_CASE(base10_units)
130
+{
131
+ EXPECT_EQ(human_readable_size(999, AK::HumanReadableBasedOn::Base10), "999 B");
132
+ EXPECT_EQ(human_readable_size(1024, AK::HumanReadableBasedOn::Base10), "1.0 KB");
133
+ EXPECT_EQ(human_readable_size(1100, AK::HumanReadableBasedOn::Base10), "1.1 KB");
134
+ EXPECT_EQ(human_readable_size(1000000, AK::HumanReadableBasedOn::Base10), "1.0 MB");
135
+}
0 commit comments