The test fails on 32 bit systems. Let it panic instead.
if sn < 0 {
return "", errors.New("strings: negative Repeat count")
- } else if sn > 0 && len(ss)*sn/sn != len(ss) {
- return "", errors.New("strings: Repeat count causes overflow")
}
return _strings.Repeat(ss, sn), nil
import (
"fmt"
"html/template"
- "math"
"testing"
"github.com/gohugoio/hugo/deps"
// errors
{"", tstNoStringer{}, false},
{tstNoStringer{}, "", false},
- {"ab", math.MaxInt64, false},
+ {"ab", -1, false},
} {
errMsg := fmt.Sprintf("[%d] %v", i, test)