diff options
author | Andrew Gerrand <adg@golang.org> | 2014-11-06 15:22:29 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2014-11-06 15:22:29 +1100 |
commit | 59b899e8639f2b3f3cf931bcff12528c34003cc8 (patch) | |
tree | ef0aacf9d1f31607b1a3fdf1afe7e972b102ffc1 /src | |
parent | 480e360b9103c49c7fed8216a725e97aebcd39d0 (diff) | |
download | go-59b899e8639f2b3f3cf931bcff12528c34003cc8.tar.gz |
bufio: remove unused 'panicked' variable from test
LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/166230044
Diffstat (limited to 'src')
-rw-r--r-- | src/bufio/scan_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bufio/scan_test.go b/src/bufio/scan_test.go index bf888dafb..eea87cbf7 100644 --- a/src/bufio/scan_test.go +++ b/src/bufio/scan_test.go @@ -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) } }() |