style: reformat test tables

This commit is contained in:
2026-10-03 21:41:54 +02:00
parent bed80b046b
commit b49859537b
12 changed files with 146 additions and 59 deletions
+21 -9
View File
@@ -23,15 +23,27 @@ func mustExpr(t *testing.T, src string) ast.Expr {
func TestGoTypeToSQL(t *testing.T) {
r := newTestReader()
tests := []struct{ src, want string }{
{"int", "integer"}, {"int32", "integer"}, {"int64", "bigint"},
{"string", "text"}, {"bool", "boolean"}, {"float32", "real"},
{"float64", "double precision"}, {"uint8", "text"},
{"time.Time", "timestamp"}, {"time.Duration", "text"},
{"sql_types.SqlString", "text"}, {"sql_types.SqlInt", "integer"},
{"sql_types.SqlInt64", "bigint"}, {"sql_types.SqlFloat", "double precision"},
{"sql_types.SqlBool", "boolean"}, {"sql_types.SqlTime", "timestamp"},
{"sql_types.Other", "text"}, {"other.Thing", "text"},
{"*int64", "bigint"}, {"*time.Time", "timestamp"}, {"[]byte", "text"},
{"int", "integer"},
{"int32", "integer"},
{"int64", "bigint"},
{"string", "text"},
{"bool", "boolean"},
{"float32", "real"},
{"float64", "double precision"},
{"uint8", "text"},
{"time.Time", "timestamp"},
{"time.Duration", "text"},
{"sql_types.SqlString", "text"},
{"sql_types.SqlInt", "integer"},
{"sql_types.SqlInt64", "bigint"},
{"sql_types.SqlFloat", "double precision"},
{"sql_types.SqlBool", "boolean"},
{"sql_types.SqlTime", "timestamp"},
{"sql_types.Other", "text"},
{"other.Thing", "text"},
{"*int64", "bigint"},
{"*time.Time", "timestamp"},
{"[]byte", "text"},
}
for _, tt := range tests {
t.Run(tt.src, func(t *testing.T) {