7 "github.com/stretchr/testify/assert"
10 func TestError(t *testing.T) {
11 assert.EqualError(t, Error{os.Interrupt},
12 "received signal: "+os.Interrupt.String())
15 func BenchmarkError(b *testing.B) {
16 expected := "received signal: " + os.Interrupt.String()
17 for i := 0; i < b.N; i++ {
18 if s := (Error{os.Interrupt}).String(); s != expected {
19 b.Fatalf("expected %s, got %s", s, expected)