aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_test.go
diff options
context:
space:
mode:
authorMario Trangoni <mjtrangoni@gmail.com>2018-04-17 11:00:36 +0200
committerMario Trangoni <mjtrangoni@gmail.com>2018-04-17 12:21:29 +0200
commit28e6f6d6751aaa0657ccdf9f330a7e6843b15ece (patch)
tree441e9c790536c1587d6aacdd24981a175f08d4bf /sqlite3_test.go
parentfix all unconvert issues (diff)
downloadgolite-28e6f6d6751aaa0657ccdf9f330a7e6843b15ece.tar.gz
golite-28e6f6d6751aaa0657ccdf9f330a7e6843b15ece.tar.xz
fix all gosimple issues
Diffstat (limited to 'sqlite3_test.go')
-rw-r--r--sqlite3_test.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/sqlite3_test.go b/sqlite3_test.go
index 09e6727..8d65243 100644
--- a/sqlite3_test.go
+++ b/sqlite3_test.go
@@ -563,7 +563,7 @@ func TestBoolean(t *testing.T) {
t.Fatalf("Expected 1 row but %v", counter)
}
- if id != 1 && fbool != true {
+ if id != 1 && !fbool {
t.Fatalf("Value for id 1 should be %v, not %v", bool1, fbool)
}
@@ -585,7 +585,7 @@ func TestBoolean(t *testing.T) {
t.Fatalf("Expected 1 row but %v", counter)
}
- if id != 2 && fbool != false {
+ if id != 2 && fbool {
t.Fatalf("Value for id 2 should be %v, not %v", bool2, fbool)
}
@@ -1410,10 +1410,7 @@ func BenchmarkCustomFunctions(b *testing.B) {
sql.Register("sqlite3_BenchmarkCustomFunctions", &SQLiteDriver{
ConnectHook: func(conn *SQLiteConn) error {
// Impure function to force sqlite to reexecute it each time.
- if err := conn.RegisterFunc("custom_add", customAdd, false); err != nil {
- return err
- }
- return nil
+ return conn.RegisterFunc("custom_add", customAdd, false)
},
})
})