style: reformat test tables
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user