1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 16:10:08 +00:00

test: update bytes_to_human performance test inputs to use Base-10 values

This commit is contained in:
tw93
2026-02-28 11:38:49 +08:00
parent 9fed092283
commit 7568bfc579

View File

@@ -34,26 +34,26 @@ setup() {
}
@test "bytes_to_human produces correct output for GB range" {
result=$(bytes_to_human 1073741824)
result=$(bytes_to_human 1000000000)
[ "$result" = "1.00GB" ]
result=$(bytes_to_human 5368709120)
result=$(bytes_to_human 5000000000)
[ "$result" = "5.00GB" ]
}
@test "bytes_to_human produces correct output for MB range" {
result=$(bytes_to_human 1048576)
result=$(bytes_to_human 1000000)
[ "$result" = "1.0MB" ]
result=$(bytes_to_human 104857600)
result=$(bytes_to_human 100000000)
[ "$result" = "100.0MB" ]
}
@test "bytes_to_human produces correct output for KB range" {
result=$(bytes_to_human 1024)
result=$(bytes_to_human 1000)
[ "$result" = "1KB" ]
result=$(bytes_to_human 10240)
result=$(bytes_to_human 10000)
[ "$result" = "10KB" ]
}