File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ func TestSetter(t *testing.T) {
6060}
6161
6262func TestBuildTypeBody (t * testing.T ) {
63- tests := map [string ]struct {
63+ for name , tt := range map [string ]struct {
6464 expect * obj.Object
6565 got * obj.Object
6666 expected string
@@ -115,9 +115,7 @@ func TestBuildTypeBody(t *testing.T) {
115115 got : obj .NewObject (nil ),
116116 expected : "Got:<nil>" ,
117117 },
118- }
119-
120- for name , tt := range tests {
118+ } {
121119 t .Run (name , func (t * testing.T ) {
122120 f := NewFailure ()
123121 if tt .expect != nil {
@@ -136,7 +134,7 @@ func TestBuildTypeBody(t *testing.T) {
136134}
137135
138136func TestIsDifferentTypes (t * testing.T ) {
139- tests := map [string ]struct {
137+ for name , tt := range map [string ]struct {
140138 expect * obj.Object
141139 got * obj.Object
142140 expected bool
@@ -201,9 +199,7 @@ func TestIsDifferentTypes(t *testing.T) {
201199 got : obj .NewObject (struct { Name string }{Name : "test" }),
202200 expected : true ,
203201 },
204- }
205-
206- for name , tt := range tests {
202+ } {
207203 t .Run (name , func (t * testing.T ) {
208204 f := NewFailure ()
209205 if tt .expect != nil {
You can’t perform that action at this time.
0 commit comments