Skip to content

test: compile fixtures on 32-bit - #177

Open
team-humaki wants to merge 1 commit into
francoispqt:masterfrom
team-humaki:test/32bit-int-overflow
Open

team-humaki wants to merge 1 commit into
francoispqt:masterfrom
team-humaki:test/32bit-int-overflow

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #173

testSliceInts was []int with literals that overflow 32-bit int, so the suite did not compile on i686.

Decode those array fixtures into int64. DecodeInt cases now use math.MaxInt (and a 5.01e+08 exponent) so they stay in range. EncodeInt64 expected JSON uses int64(math.MaxInt64) so %d does not overflow.

go test -count=1 . passes. GOOS=linux GOARCH=386 go test -c compiles.

testSliceInts used []int with values that overflow 32-bit int, so the
suite failed to compile on i686. Decode into int64 for those array
fixtures, and keep DecodeInt cases within math.MaxInt.

Fixes francoispqt#173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing unit tests on i686 architecture (RISC-V): constant ... overflows int

1 participant