Skip to content

Commit 64476e7

Browse files
committed
peertls/extensions: use format string in test
Change-Id: Ibb51794230f36dd0cc3a284778c99e973e4a4847
1 parent 9815a85 commit 64476e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

peertls/extensions/extensions_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"crypto/x509"
99
"crypto/x509/pkix"
1010
"encoding/gob"
11-
"strconv"
11+
"fmt"
1212
"testing"
1313

1414
"github.com/stretchr/testify/assert"
@@ -57,14 +57,14 @@ func TestHandlers_Register(t *testing.T) {
5757

5858
assert.NotNil(t, chain)
5959
assert.Equal(t, chains[i], chain)
60-
return errs.New(strconv.Itoa(i))
60+
return errs.New("%v", i)
6161
}
6262
},
6363
)
6464
handlers.Register(testHandler)
6565

6666
err = handlers[i].NewHandlerFunc(opts[i])(exts[i], chains[i])
67-
assert.Errorf(t, err, strconv.Itoa(i))
67+
assert.Errorf(t, err, fmt.Sprintf("%v", i))
6868
}
6969
}
7070

@@ -103,7 +103,7 @@ func TestHandlers_WithOptions(t *testing.T) {
103103

104104
assert.NotNil(t, chain)
105105
assert.Equal(t, chains[i], chain)
106-
return errs.New(strconv.Itoa(i))
106+
return errs.New("%v", i)
107107
}
108108
},
109109
)

0 commit comments

Comments
 (0)