From 131069186815d2515c6dac05bb1ccb979ec07395 Mon Sep 17 00:00:00 2001 From: Pawel Krolikowski Date: Thu, 27 Jul 2023 23:49:42 -0400 Subject: [PATCH] Table test TestFieldConstructors Tiny test refactoring to make debugging easier. Spotted in #1305. --- field_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/field_test.go b/field_test.go index 5b49eb2f0..b0abbf5f8 100644 --- a/field_test.go +++ b/field_test.go @@ -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) + }) } }