summaryrefslogtreecommitdiff
path: root/AK/Tests
diff options
context:
space:
mode:
authorJean-Baptiste Boric <jblbeurope@gmail.com>2021-03-17 18:34:13 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-17 23:22:42 +0100
commit607fac662da628afdcfafa2393a72bc908db4f20 (patch)
tree6ae68092ba4984012ffdd8f8ecc5eecd1c3f267c /AK/Tests
parent7ffc6c371a61b30add68bf29a24403dcd14cfcbf (diff)
downloadserenity-607fac662da628afdcfafa2393a72bc908db4f20.zip
AK: Implement terabytes, petabytes, exabytes
Diffstat (limited to 'AK/Tests')
-rw-r--r--AK/Tests/TestNumberFormat.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/AK/Tests/TestNumberFormat.cpp b/AK/Tests/TestNumberFormat.cpp
index 6fa554e222..90a2cb63b5 100644
--- a/AK/Tests/TestNumberFormat.cpp
+++ b/AK/Tests/TestNumberFormat.cpp
@@ -136,12 +136,11 @@ TEST_CASE(extremes_8byte)
EXPECT_EQ(human_readable_size(0x100000000ULL), "4.0 GiB");
EXPECT_EQ(human_readable_size(0x100000001ULL), "4.0 GiB");
EXPECT_EQ(human_readable_size(0x800000000ULL), "32.0 GiB");
- EXPECT_EQ(human_readable_size(0x10000000000ULL), "1024.0 GiB");
-
- // Oh yeah! These are *correct*!
- EXPECT_EQ(human_readable_size(0x7fffffffffffffffULL), "8589934591.9 GiB");
- EXPECT_EQ(human_readable_size(0x8000000000000000ULL), "8589934592.0 GiB");
- EXPECT_EQ(human_readable_size(0xffffffffffffffffULL), "17179869183.9 GiB");
+ EXPECT_EQ(human_readable_size(0x10000000000ULL), "1.0 TiB");
+ EXPECT_EQ(human_readable_size(0x4000000000000ULL), "1.0 PiB");
+ EXPECT_EQ(human_readable_size(0x7fffffffffffffffULL), "7.9 EiB");
+ EXPECT_EQ(human_readable_size(0x8000000000000000ULL), "8.0 EiB");
+ EXPECT_EQ(human_readable_size(0xffffffffffffffffULL), "15.9 EiB");
} else {
warnln("(Skipping 8-byte-size_t test on 32-bit platform)");
}