summaryrefslogtreecommitdiff
path: root/test/zerodivide.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/zerodivide.go')
-rw-r--r--test/zerodivide.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/zerodivide.go b/test/zerodivide.go
index 3a1ff1505..3b08e774c 100644
--- a/test/zerodivide.go
+++ b/test/zerodivide.go
@@ -158,10 +158,10 @@ var errorTests = []ErrorTest{
ErrorTest{"complex128 1/0", func() { use(e128 / d128) }, ""},
}
-func error(fn func()) (error string) {
+func error_(fn func()) (error string) {
defer func() {
if e := recover(); e != nil {
- error = e.(runtime.Error).String()
+ error = e.(runtime.Error).Error()
}
}()
fn()
@@ -196,7 +196,7 @@ func main() {
if t.err != "" {
continue
}
- err := error(t.fn)
+ err := error_(t.fn)
switch {
case t.err == "" && err == "":
// fine