Commit b499e7c0 authored by gwenn's avatar gwenn

Improve checkNoError test function.

parent d5bb2294
......@@ -5,16 +5,21 @@
package sqlite_test
import (
"github.com/bmizerany/assert"
. "github.com/gwenn/gosqlite"
"fmt"
"path"
"reflect"
"runtime"
"strings"
"testing"
"github.com/bmizerany/assert"
. "github.com/gwenn/gosqlite"
)
func checkNoError(t *testing.T, err error, format string) {
if err != nil {
t.Fatalf(format, err)
_, file, line, _ := runtime.Caller(1)
t.Fatalf("\n%s:%d: %s", path.Base(file), line, fmt.Sprintf(format, 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