mirror of https://github.com/gin-gonic/gin.git
fix readability in recovery test (#2797)
This commit is contained in:
parent
0a55865c3f
commit
11aa11a656
|
@ -92,14 +92,14 @@ func TestPanicWithAbort(t *testing.T) {
|
||||||
|
|
||||||
func TestSource(t *testing.T) {
|
func TestSource(t *testing.T) {
|
||||||
bs := source(nil, 0)
|
bs := source(nil, 0)
|
||||||
assert.Equal(t, []byte("???"), bs)
|
assert.Equal(t, dunno, bs)
|
||||||
|
|
||||||
in := [][]byte{
|
in := [][]byte{
|
||||||
[]byte("Hello world."),
|
[]byte("Hello world."),
|
||||||
[]byte("Hi, gin.."),
|
[]byte("Hi, gin.."),
|
||||||
}
|
}
|
||||||
bs = source(in, 10)
|
bs = source(in, 10)
|
||||||
assert.Equal(t, []byte("???"), bs)
|
assert.Equal(t, dunno, bs)
|
||||||
|
|
||||||
bs = source(in, 1)
|
bs = source(in, 1)
|
||||||
assert.Equal(t, []byte("Hello world."), bs)
|
assert.Equal(t, []byte("Hello world."), bs)
|
||||||
|
@ -107,7 +107,7 @@ func TestSource(t *testing.T) {
|
||||||
|
|
||||||
func TestFunction(t *testing.T) {
|
func TestFunction(t *testing.T) {
|
||||||
bs := function(1)
|
bs := function(1)
|
||||||
assert.Equal(t, []byte("???"), bs)
|
assert.Equal(t, dunno, bs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestPanicWithBrokenPipe asserts that recovery specifically handles
|
// TestPanicWithBrokenPipe asserts that recovery specifically handles
|
||||||
|
|
Loading…
Reference in New Issue