@@ -69,7 +69,7 @@ func Test_ValueFromField(t *testing.T) {
6969 CreateTime : 1630248918 ,
7070 }
7171 value := valuesFromModel (reflect .TypeOf (model ), reflect .ValueOf (model ))
72- assert .Equal (t , []driver.Value {uint64 (10 ), "test" , "1,2" , uint32 (1630248918 )}, value )
72+ assert .Equal (t , []driver.Value {uint64 (10 ), "test" , [] byte ( "1,2" ) , uint32 (1630248918 )}, value )
7373}
7474
7575func Test_SingleRow (t * testing.T ) {
@@ -81,7 +81,7 @@ func Test_SingleRow(t *testing.T) {
8181 }
8282
8383 targetRows := sqlmock .NewRows ([]string {"id" , "name" , "custom_field" , "create_time" }).
84- AddRow (uint64 (12 ), "test_abc" , "1,2" , uint32 (1630248920 ))
84+ AddRow (uint64 (12 ), "test_abc" , [] byte ( "1,2" ) , uint32 (1630248920 ))
8585
8686 rows := ModelToRows (model )
8787 assert .Equal (t , targetRows , rows )
@@ -106,8 +106,8 @@ func Test_MultiStructValueRows(t *testing.T) {
106106 }
107107
108108 targetRows := sqlmock .NewRows ([]string {"id" , "name" , "custom_field" , "create_time" }).
109- AddRow (uint64 (12 ), "test_abc" , "1,2" , uint32 (1630248920 )).
110- AddRow (uint64 (13 ), "test_efg" , "" , uint32 (1630248922 ))
109+ AddRow (uint64 (12 ), "test_abc" , [] byte ( "1,2" ) , uint32 (1630248920 )).
110+ AddRow (uint64 (13 ), "test_efg" , [] byte ( "" ) , uint32 (1630248922 ))
111111
112112 rows := ModelToRows (model )
113113 assert .Equal (t , targetRows , rows )
@@ -129,8 +129,8 @@ func Test_MultiStructPtrRows(t *testing.T) {
129129 }
130130
131131 targetRows := sqlmock .NewRows ([]string {"id" , "name" , "custom_field" , "create_time" }).
132- AddRow (uint64 (12 ), "test_abc" , "" , uint32 (1630248920 )).
133- AddRow (uint64 (13 ), "test_efg" , "" , uint32 (1630248922 ))
132+ AddRow (uint64 (12 ), "test_abc" , [] byte ( "" ) , uint32 (1630248920 )).
133+ AddRow (uint64 (13 ), "test_efg" , [] byte ( "" ) , uint32 (1630248922 ))
134134
135135 rows := ModelToRows (model )
136136 assert .Equal (t , targetRows , rows )
0 commit comments