Skip to content

Commit

Permalink
Table test TestFieldConstructors
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 committed Jul 28, 2023
1 parent 382e251 commit 1310691
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 1310691

Please sign in to comment.