mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 20:15:07 +00:00
test: update bytes_to_human performance test inputs to use Base-10 values
This commit is contained in:
@@ -34,26 +34,26 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "bytes_to_human produces correct output for GB range" {
|
@test "bytes_to_human produces correct output for GB range" {
|
||||||
result=$(bytes_to_human 1073741824)
|
result=$(bytes_to_human 1000000000)
|
||||||
[ "$result" = "1.00GB" ]
|
[ "$result" = "1.00GB" ]
|
||||||
|
|
||||||
result=$(bytes_to_human 5368709120)
|
result=$(bytes_to_human 5000000000)
|
||||||
[ "$result" = "5.00GB" ]
|
[ "$result" = "5.00GB" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "bytes_to_human produces correct output for MB range" {
|
@test "bytes_to_human produces correct output for MB range" {
|
||||||
result=$(bytes_to_human 1048576)
|
result=$(bytes_to_human 1000000)
|
||||||
[ "$result" = "1.0MB" ]
|
[ "$result" = "1.0MB" ]
|
||||||
|
|
||||||
result=$(bytes_to_human 104857600)
|
result=$(bytes_to_human 100000000)
|
||||||
[ "$result" = "100.0MB" ]
|
[ "$result" = "100.0MB" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "bytes_to_human produces correct output for KB range" {
|
@test "bytes_to_human produces correct output for KB range" {
|
||||||
result=$(bytes_to_human 1024)
|
result=$(bytes_to_human 1000)
|
||||||
[ "$result" = "1KB" ]
|
[ "$result" = "1KB" ]
|
||||||
|
|
||||||
result=$(bytes_to_human 10240)
|
result=$(bytes_to_human 10000)
|
||||||
[ "$result" = "10KB" ]
|
[ "$result" = "10KB" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user