Skip to content

Commit

Permalink
Table test TestFieldConstructors (#1306)
Browse files Browse the repository at this point in the history
Tiny test refactoring to make debugging easier. Spotted in #1305.
  • Loading branch information
rabbbit authored Jul 28, 2023
2 parents 382e251 + 1310691 commit 8d1bd8c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,12 @@ func TestFieldConstructors(t *testing.T) {
}

for _, tt := range tests {
if !assert.Equal(t, tt.expect, tt.field, "Unexpected output from convenience field constructor %s.", tt.name) {
t.Logf("type expected: %T\nGot: %T", tt.expect.Interface, tt.field.Interface)
}
assertCanBeReused(t, tt.field)
t.Run(tt.name, func(t *testing.T) {
if !assert.Equal(t, tt.expect, tt.field, "Unexpected output from convenience field constructor") {
t.Logf("type expected: %T\nGot: %T", tt.expect.Interface, tt.field.Interface)
}
assertCanBeReused(t, tt.field)
})
}
}

Expand Down

0 comments on commit 8d1bd8c

Please sign in to comment.