Address remaining PR #239 review findings
This commit is contained in:
parent
47f4b5e55a
commit
bfe36f817d
6 changed files with 236 additions and 74 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"math"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -500,6 +501,9 @@ func asInt(t *testing.T, value any, field string) int {
|
|||
case uint64:
|
||||
return int(typed)
|
||||
case float64:
|
||||
if typed != math.Trunc(typed) {
|
||||
t.Fatalf("%s should be integer-valued, got %v", field, typed)
|
||||
}
|
||||
return int(typed)
|
||||
default:
|
||||
t.Fatalf("%s has unexpected type %T (%v)", field, value, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue