diff --git a/buildengine/build_test.go b/buildengine/build_test.go index edfb726a09..d2c61877a1 100644 --- a/buildengine/build_test.go +++ b/buildengine/build_test.go @@ -67,23 +67,23 @@ func assertBuildProtoErrors(msgs ...string) assertion { errorList, err := loadProtoErrors(filepath.Join(bctx.moduleDir, bctx.buildDir)) assert.NoError(t, err, "Error loading proto errors") - expected := make([]*schema.Error, 0, len(msgs)) + expected := make([]error, 0, len(msgs)) for _, msg := range msgs { expected = append(expected, &schema.Error{Msg: msg}) } // normalize results - errs := make([]error, 0, len(errorList.Errors)) for _, e := range errorList.Errors { - errs = append(errs, *e) + e.EndColumn = 0 } - schema.SortErrorsByPosition(errs) + errs := make([]error, 0, len(errorList.Errors)) for _, e := range errorList.Errors { - e.EndColumn = 0 + errs = append(errs, e) } + schema.SortErrorsByPosition(errs) - assert.Equal(t, errorList.Errors, expected, assert.Exclude[schema.Position]()) + assert.Equal(t, errs, expected, assert.Exclude[schema.Position]()) return nil } }