Skip to content

Commit dd523d1

Browse files
authored
Cast numbers in "uint oob" test error messages to avoid overflows (#514)
Detected by Debian CI running on 386; see https://ci.debian.net/packages/g/golang-github-aws-smithy-go/testing/i386/47149094/#L1260
1 parent 18cc44b commit dd523d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

encoding/cbor/coerce_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func TestAsInt32(t *testing.T) {
143143
},
144144
"uint oob": {
145145
In: Uint(maxv + 1),
146-
Err: fmt.Sprintf("cbor uint %d exceeds", maxv+1),
146+
Err: fmt.Sprintf("cbor uint %d exceeds", Uint(maxv+1)),
147147
},
148148
"negint oob": {
149149
In: NegInt(maxv + 2),
@@ -330,7 +330,7 @@ func TestAsFloat64(t *testing.T) {
330330
},
331331
"uint oob": {
332332
In: Uint(maxv + 1),
333-
Err: fmt.Sprintf("cbor uint %d exceeds", maxv+1),
333+
Err: fmt.Sprintf("cbor uint %d exceeds", Uint(maxv+1)),
334334
},
335335
"negint oob": {
336336
In: NegInt(maxv + 2),

0 commit comments

Comments
 (0)