Skip to content

Commit 83e62b2

Browse files
committed
parser/test: fix bug in comparison
Uses IgnoreFields instead of IgnoreTypes to ensure the expectations are correctly asserted. The assertion was broken by 1244d31. Signed-off-by: Shashank Ram <[email protected]>
1 parent 1244d31 commit 83e62b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v2/parser/parse_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ func TestStructParse(t *testing.T) {
11231123
t.Errorf("type %s did not have GoType", expected.Name.Name)
11241124
}
11251125
opts := []cmp.Option{
1126-
cmpopts.IgnoreTypes(types.Type{}, "GoType"),
1126+
cmpopts.IgnoreFields(types.Type{}, "GoType"),
11271127
}
11281128
if e, a := expected, st; !cmp.Equal(e, a, opts...) {
11291129
t.Errorf("wanted, got:\n%#v\n%#v\n%s", e, a, cmp.Diff(e, a, opts...))

0 commit comments

Comments
 (0)