[bindings] Support aliases in package imports

This commit is contained in:
Lea Anthony
2024-01-14 08:07:47 +11:00
parent 3cd26a2220
commit 2d97776caa
9 changed files with 36 additions and 25 deletions
@@ -244,7 +244,7 @@ func TestParseVariableSingle(t *testing.T) {
for packageName, packageData := range tt.wantBoundMethods {
for structName, wantBoundMethods := range packageData {
gotBoundMethods := got.BoundMethods[packageName][structName]
if diff := cmp.Diff(wantBoundMethods, gotBoundMethods); diff != "" {
if diff := cmp.Diff(wantBoundMethods, gotBoundMethods, cmp.AllowUnexported(Parameter{})); diff != "" {
t.Errorf("ParseDirectory() failed:\n" + diff)
}
}
@@ -260,7 +260,7 @@ func TestParseVariableSingle(t *testing.T) {
}
}
if diff := cmp.Diff(tt.wantBoundMethods, got.BoundMethods); diff != "" {
if diff := cmp.Diff(tt.wantBoundMethods, got.BoundMethods, cmp.AllowUnexported(Parameter{})); diff != "" {
t.Errorf("ParseDirectory() failed:\n" + diff)
}
if !reflect.DeepEqual(tt.wantModels, got.Models) {