Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 64-bit tests on 32-bit systems #60

Merged
merged 1 commit into from Jan 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions parser_test.go
Expand Up @@ -869,8 +869,8 @@ func TestParserParse(t *testing.T) {
if err != nil {
t.Fatalf("cannot obtain int64: %s", err)
}
if n != -8838840643388017390 {
t.Fatalf("unexpected value obtained for int64; got %d; want %d", n, -8838840643388017390)
if n != int64(-8838840643388017390) {
t.Fatalf("unexpected value obtained for int64; got %d; want %d", n, int64(-8838840643388017390))
}
s := v.String()
if s != "-8838840643388017390" {
Expand All @@ -887,11 +887,11 @@ func TestParserParse(t *testing.T) {
if tp != TypeNumber || tp.String() != "number" {
t.Fatalf("unexpected type obtained for uint: %#v", v)
}
n, err := v.Uint()
n, err := v.Uint64()
if err != nil {
t.Fatalf("cannot obtain uint64: %s", err)
}
if n != 18446744073709551615 {
if n != uint64(18446744073709551615) {
t.Fatalf("unexpected value obtained for uint; got %d; want %d", n, uint64(18446744073709551615))
}
s := v.String()
Expand Down