mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/logstorage: fix TestValuesEncoder() on 32-bit architectures
This commit is contained in:
parent
c76084b529
commit
a79e53d82a
1 changed files with 7 additions and 7 deletions
|
@ -55,27 +55,27 @@ func TestValuesEncoder(t *testing.T) {
|
|||
|
||||
// uint8 values
|
||||
for i := range values {
|
||||
values[i] = fmt.Sprintf("%d", i+1)
|
||||
values[i] = fmt.Sprintf("%d", uint64(i+1))
|
||||
}
|
||||
f(values, valueTypeUint8, 1, uint64(len(values)))
|
||||
|
||||
// uint16 values
|
||||
for i := range values {
|
||||
values[i] = fmt.Sprintf("%d", (i+1)<<8)
|
||||
values[i] = fmt.Sprintf("%d", uint64(i+1)<<8)
|
||||
}
|
||||
f(values, valueTypeUint16, 1<<8, uint64(len(values)<<8))
|
||||
f(values, valueTypeUint16, 1<<8, uint64(len(values))<<8)
|
||||
|
||||
// uint32 values
|
||||
for i := range values {
|
||||
values[i] = fmt.Sprintf("%d", (i+1)<<16)
|
||||
values[i] = fmt.Sprintf("%d", uint64(i+1)<<16)
|
||||
}
|
||||
f(values, valueTypeUint32, 1<<16, uint64(len(values)<<16))
|
||||
f(values, valueTypeUint32, 1<<16, uint64(len(values))<<16)
|
||||
|
||||
// uint64 values
|
||||
for i := range values {
|
||||
values[i] = fmt.Sprintf("%d", (i+1)<<32)
|
||||
values[i] = fmt.Sprintf("%d", uint64(i+1)<<32)
|
||||
}
|
||||
f(values, valueTypeUint64, 1<<32, uint64(len(values)<<32))
|
||||
f(values, valueTypeUint64, 1<<32, uint64(len(values))<<32)
|
||||
|
||||
// ipv4 values
|
||||
for i := range values {
|
||||
|
|
Loading…
Reference in a new issue