Commit 908dcab6 authored by Andrew Gerrand's avatar Andrew Gerrand

bufio: remove unused 'panicked' variable from test

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/166230044
parent 39bcbb35
......@@ -467,15 +467,12 @@ func TestDontLoopForever(t *testing.T) {
s := NewScanner(strings.NewReader("abc"))
s.Split(loopAtEOFSplit)
// Expect a panic
panicked := true
defer func() {
err := recover()
if err == nil {
t.Fatal("should have panicked")
}
if msg, ok := err.(string); ok && strings.Contains(msg, "empty tokens") {
panicked = true
} else {
if msg, ok := err.(string); !ok || !strings.Contains(msg, "empty tokens") {
panic(err)
}
}()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment