Commit c0d93694 authored by gwenn's avatar gwenn

Improve test coverage

parent 5336cdc1
......@@ -92,6 +92,7 @@ func TestBlob(t *testing.T) {
err = bw.Reopen(-1)
assert.T(t, err != nil)
assert.T(t, err.Error() != "")
//println(err.Error())
_, err = bw.Write(content)
......
......@@ -48,11 +48,11 @@ func TestEnableTriggers(t *testing.T) {
defer checkClose(db, t)
b, err := db.AreTriggersEnabled()
checkNoError(t, err, "%s")
if !b {
b, err = db.EnableTriggers(true)
checkNoError(t, err, "%s")
assert.T(t, b, "cannot enable triggers")
}
//if !b {
b, err = db.EnableTriggers(true)
checkNoError(t, err, "%s")
assert.T(t, b, "cannot enable triggers")
//}
}
func TestEnableExtendedResultCodes(t *testing.T) {
......
......@@ -139,6 +139,7 @@ func TestColumn(t *testing.T) {
column, err = db.Column("", "test", "bim")
assert.T(t, err != nil, "expected error")
assert.T(t, err.Error() != "")
//println(err.Error())
}
......
......@@ -244,13 +244,7 @@ func (c *Conn) oneValue(query string, value interface{}) error { // no cache
}
return s.error(rv, fmt.Sprintf("Conn.oneValue(%q)", query))
}
func (s *Stmt) execQuery(rowCallbackHandler func(s *Stmt) error, args ...interface{}) error { // no check on column count
if len(args) > 0 {
err := s.Bind(args...)
if err != nil {
return err
}
}
func (s *Stmt) execQuery(rowCallbackHandler func(s *Stmt) error) error { // no check on column count
for {
if ok, err := s.Next(); err != nil {
return 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