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:
Roman Khavronenko 2020-08-20 22:27:37 +01:00 committed by GitHub
parent efc730863b
commit f2c004d1ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}