Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions go/tests/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,19 @@ func compare1(path []string, got, want any, add func([]string, string, ...any))
check()
}

case uint64:
if n, ok := got.(json.Number); ok {
g, err := n.Int64()
if err != nil {
add(path, "got number %s, want %d (%[2]T)", n, w)
}
if uint64(g) != w {
add(path, "got %d, want %d", g, w)
}
} else {
check()
}

case float64:
if n, ok := got.(json.Number); ok {
g, err := n.Float64()
Expand Down
Loading