diff --git a/builtin/builtin_test.go b/builtin/builtin_test.go index 50f91de92..c117fca16 100644 --- a/builtin/builtin_test.go +++ b/builtin/builtin_test.go @@ -530,7 +530,7 @@ func TestBuiltin_memory_limits(t *testing.T) { tests := []struct { input string }{ - {`repeat("\xc4<\xc4\xc4\xc4",10009999990)`}, + {fmt.Sprintf(`repeat("\xc4<\xc4\xc4\xc4",%d)`, math.MaxInt)}, } for _, test := range tests { diff --git a/expr_test.go b/expr_test.go index 7e2b3eff1..9f7e83ab5 100644 --- a/expr_test.go +++ b/expr_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "math" "os" "reflect" "strings" @@ -1377,7 +1378,7 @@ func TestExpr(t *testing.T) { }, { `bitushr(-100, 5)`, - 576460752303423484, + int((math.MaxUint - 99) >> 5), }, { `"hello"[1:3]`, diff --git a/internal/testify/assert/helpers_test.go b/internal/testify/assert/helpers_test.go index 7bbf56db9..8e1847cc3 100644 --- a/internal/testify/assert/helpers_test.go +++ b/internal/testify/assert/helpers_test.go @@ -67,7 +67,7 @@ func TestObjectsAreEqualValues(t *testing.T) { {10.5, 10, false}, // Known limitation inherited from upstream: with equal sizes the actual // value is converted to the expected type, so 10.5 truncates to 10. - {10, 10.5, true}, + {int64(10), 10.5, true}, // The smaller type is converted to the larger one, so overflow // must not create false positives. {int(270), uint8(14), false},