tpl/strings: Adjust the overflow validation in strings.Repeat

This now matches the validation in the stdlib, but we return an error instead.
This commit is contained in:
Bjørn Erik Pedersen
2018-06-03 10:35:45 +03:00
parent 13435a6f60
commit 90c7749085
2 changed files with 5 additions and 5 deletions

View File

@@ -730,7 +730,7 @@ func TestRepeat(t *testing.T) {
// errors
{"", tstNoStringer{}, false},
{tstNoStringer{}, "", false},
{"hi", math.MaxInt16 + 1, false},
{"ab", math.MaxInt64, false},
} {
errMsg := fmt.Sprintf("[%d] %v", i, test)