comment string
}
-func recoverError(err *os.Error) {
+func recoverError(errp *os.Error) {
if e := recover(); e != nil {
- if osErr, ok := e.(os.Error); ok {
- *err = osErr
+ if err, ok := e.(os.Error); ok {
+ *errp = err
return
}
panic(e)
buf.Reset()
buf.WriteString(test.input)
if _, err := fmt.Fscanf(&buf, test.format, x); err != nil {
- t.Errorf("#%d error: %s", i, err.String())
+ t.Errorf("#%d error: %s", i, err)
}
if x.String() != test.output {
t.Errorf("#%d got %s; want %s", i, x.String(), test.output)
_, err := fmt.Fscanf(&buf, "%v", x)
if err == nil != test.ok {
if test.ok {
- t.Errorf("#%d error: %s", i, err.String())
+ t.Errorf("#%d error: %s", i, err)
} else {
t.Errorf("#%d expected error", i)
}