This commit is contained in:
Nuno Cruces
2023-02-08 00:00:53 +00:00
parent 770ab8a073
commit 4597acc49d
8 changed files with 394 additions and 8 deletions

24
const_test.go Normal file
View 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)
}
})
}
}