Commit b499e7c0 authored by gwenn's avatar gwenn

Improve checkNoError test function.

parent d5bb2294
...@@ -5,16 +5,21 @@ ...@@ -5,16 +5,21 @@
package sqlite_test package sqlite_test
import ( import (
"github.com/bmizerany/assert" "fmt"
. "github.com/gwenn/gosqlite" "path"
"reflect" "reflect"
"runtime"
"strings" "strings"
"testing" "testing"
"github.com/bmizerany/assert"
. "github.com/gwenn/gosqlite"
) )
func checkNoError(t *testing.T, err error, format string) { func checkNoError(t *testing.T, err error, format string) {
if err != nil { 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