mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Tests.
This commit is contained in:
24
const_test.go
Normal file
24
const_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package sqlite3
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestDatatype_String(t *testing.T) {
|
||||
tests := []struct {
|
||||
data Datatype
|
||||
want string
|
||||
}{
|
||||
{INTEGER, "INTEGER"},
|
||||
{FLOAT, "FLOAT"},
|
||||
{TEXT, "TEXT"},
|
||||
{BLOB, "BLOB"},
|
||||
{NULL, "NULL"},
|
||||
{10, "10"},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.want, func(t *testing.T) {
|
||||
if got := tt.data.String(); got != tt.want {
|
||||
t.Errorf("got %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user