mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-03 20:47:38 +03:00
parent
80bc3b3a44
commit
bb99579bb9
1 changed files with 6 additions and 6 deletions
|
@ -13,12 +13,12 @@ func TestStringToBps(t *testing.T) {
|
|||
wantErr bool
|
||||
}{
|
||||
{"bps", args{"800 bps"}, 100, false},
|
||||
{"kbps", args{"800 kbps"}, 102400, false},
|
||||
{"mbps", args{"800 mbps"}, 104857600, false},
|
||||
{"gbps", args{"800 gbps"}, 107374182400, false},
|
||||
{"tbps", args{"800 tbps"}, 109951162777600, false},
|
||||
{"mbps simp", args{"100m"}, 13107200, false},
|
||||
{"gbps simp upper", args{"2G"}, 268435456, false},
|
||||
{"kbps", args{"800 kbps"}, 100_000, false},
|
||||
{"mbps", args{"800 mbps"}, 100_000_000, false},
|
||||
{"gbps", args{"800 gbps"}, 100_000_000_000, false},
|
||||
{"tbps", args{"800 tbps"}, 100_000_000_000_000, false},
|
||||
{"mbps simp", args{"100m"}, 12_500_000, false},
|
||||
{"gbps simp upper", args{"2G"}, 250_000_000, false},
|
||||
{"invalid 1", args{"damn"}, 0, true},
|
||||
{"invalid 2", args{"6444"}, 0, true},
|
||||
{"invalid 3", args{"5.4 mbps"}, 0, true},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue