diff --git a/decor/speed_test.go b/decor/speed_test.go index 876095b..1d0b1e8 100644 --- a/decor/speed_test.go +++ b/decor/speed_test.go @@ -19,7 +19,7 @@ unit: SizeB1024(0), fmt: "", current: 0, - elapsed: time.Duration(0), + elapsed: time.Second, expected: "0 b/s", }, { @@ -27,7 +27,7 @@ unit: SizeB1024(0), fmt: "%d", current: 0, - elapsed: time.Duration(0), + elapsed: time.Second, expected: "0b/s", }, { @@ -43,7 +43,7 @@ unit: SizeB1024(0), fmt: "% .2f", current: 0, - elapsed: time.Duration(0), + elapsed: time.Second, expected: "0.00 b/s", }, { @@ -67,7 +67,7 @@ unit: SizeB1024(0), fmt: "%d", current: 2 * int64(_iKiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2KiB/s", }, { @@ -75,7 +75,7 @@ unit: SizeB1024(0), fmt: "% .2f", current: 2 * int64(_iKiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 KiB/s", }, { @@ -83,7 +83,7 @@ unit: SizeB1024(0), fmt: "%d", current: 2 * int64(_iMiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2MiB/s", }, { @@ -91,7 +91,7 @@ unit: SizeB1024(0), fmt: "% .2f", current: 2 * int64(_iMiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 MiB/s", }, { @@ -99,7 +99,7 @@ unit: SizeB1024(0), fmt: "%d", current: 2 * int64(_iGiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2GiB/s", }, { @@ -107,7 +107,7 @@ unit: SizeB1024(0), fmt: "% .2f", current: 2 * int64(_iGiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 GiB/s", }, { @@ -115,7 +115,7 @@ unit: SizeB1024(0), fmt: "%d", current: 2 * int64(_iTiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2TiB/s", }, { @@ -123,7 +123,7 @@ unit: SizeB1024(0), fmt: "% .2f", current: 2 * int64(_iTiB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 TiB/s", }, } @@ -155,7 +155,7 @@ unit: SizeB1000(0), fmt: "", current: 0, - elapsed: time.Duration(0), + elapsed: time.Second, expected: "0 b/s", }, { @@ -163,7 +163,7 @@ unit: SizeB1000(0), fmt: "%d", current: 0, - elapsed: time.Duration(0), + elapsed: time.Second, expected: "0b/s", }, { @@ -179,7 +179,7 @@ unit: SizeB1000(0), fmt: "% .2f", current: 0, - elapsed: time.Duration(0), + elapsed: time.Second, expected: "0.00 b/s", }, { @@ -203,7 +203,7 @@ unit: SizeB1000(0), fmt: "%d", current: 2 * int64(_KB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2KB/s", }, { @@ -211,7 +211,7 @@ unit: SizeB1000(0), fmt: "% .2f", current: 2 * int64(_KB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 KB/s", }, { @@ -219,7 +219,7 @@ unit: SizeB1000(0), fmt: "%d", current: 2 * int64(_MB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2MB/s", }, { @@ -227,7 +227,7 @@ unit: SizeB1000(0), fmt: "% .2f", current: 2 * int64(_MB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 MB/s", }, { @@ -235,7 +235,7 @@ unit: SizeB1000(0), fmt: "%d", current: 2 * int64(_GB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2GB/s", }, { @@ -243,7 +243,7 @@ unit: SizeB1000(0), fmt: "% .2f", current: 2 * int64(_GB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 GB/s", }, { @@ -251,7 +251,7 @@ unit: SizeB1000(0), fmt: "%d", current: 2 * int64(_TB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2TB/s", }, { @@ -259,7 +259,7 @@ unit: SizeB1000(0), fmt: "% .2f", current: 2 * int64(_TB), - elapsed: time.Second, + elapsed: 1 * time.Second, expected: "2.00 TB/s", }, }