File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4121,10 +4121,18 @@ func TestParseColumnTypeString(t *testing.T) {
41214121 }
41224122
41234123 for _ , test := range tests {
4124- t .Run (test .columnType , func (t * testing.T ) {
4125- res , err := ParseColumnTypeString (sql .NewEmptyContext (), test .columnType )
4124+ ctx := sql .NewEmptyContext ()
4125+ t .Run ("parse " + test .columnType , func (t * testing.T ) {
4126+ res , err := ParseColumnTypeString (ctx , test .columnType )
41264127 require .NoError (t , err )
41274128 require .Equal (t , test .expectedSqlType , res )
41284129 })
4130+ t .Run ("round trip " + test .columnType , func (t * testing.T ) {
4131+ str := test .expectedSqlType .String ()
4132+ typ , err := ParseColumnTypeString (ctx , str )
4133+ require .NoError (t , err )
4134+ require .Equal (t , test .expectedSqlType , typ )
4135+ require .Equal (t , typ .String (), str )
4136+ })
41294137 }
41304138}
You can’t perform that action at this time.
0 commit comments