mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/flagutil: avoid int overflow for arch 386 (#710)
Arch 386 is a 32-bit architecture and interprets int type for numbers as an explicit int32, whereas on most modern CPUs int is implicitly an int64. This makes tests to fail with `int overflow` error.
This commit is contained in:
parent
9a77ae9d1c
commit
34ef10fbcc
1 changed files with 2 additions and 2 deletions
|
@ -46,9 +46,9 @@ func TestBytesSetSuccess(t *testing.T) {
|
|||
f("1KiB", 1024)
|
||||
f("1.5kib", 1.5*1024)
|
||||
f("23MiB", 23*1024*1024)
|
||||
f("5.25GiB", 5.25*1024*1024*1024)
|
||||
f("0.25GiB", 0.25*1024*1024*1024)
|
||||
f("1KB", 1000)
|
||||
f("1.5kb", 1.5*1000)
|
||||
f("23MB", 23*1000*1000)
|
||||
f("5.25GB", 5.25*1000*1000*1000)
|
||||
f("0.25GB", 0.25*1000*1000*1000)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue