Commit 7d4ea6cc authored by Rob Pike's avatar Rob Pike

html/template: delete panic recovery code from test

The test isn't checking deliberate panics so catching them just makes the code longer.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12420043
parent 53d9b6fc
......@@ -264,12 +264,6 @@ func TestStringer(t *testing.T) {
func TestEscapingNilNonemptyInterfaces(t *testing.T) {
tmpl := Must(New("x").Parse("{{.E}}"))
defer func() {
if r := recover(); r != nil {
t.Errorf("panic during template execution: %v", r)
}
}()
got := new(bytes.Buffer)
testData := struct{ E error }{} // any non-empty interface here will do; error is just ready at hand
tmpl.Execute(got, testData)
......
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