mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
27 lines
436 B
Go
27 lines
436 B
Go
package sqlite3
|
|
|
|
import "testing"
|
|
|
|
func TestDatatype_String(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
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)
|
|
}
|
|
})
|
|
}
|
|
}
|