[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
+2 -2
View File
@@ -209,7 +209,7 @@ func TestParseFunction(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)
}
}
@@ -226,7 +226,7 @@ func TestParseFunction(t *testing.T) {
}
if !reflect.DeepEqual(tt.wantBoundMethods, got.BoundMethods) {
t.Errorf("ParseDirectory() failed:\n" + cmp.Diff(tt.wantBoundMethods, got.BoundMethods))
t.Errorf("ParseDirectory() failed:\n" + cmp.Diff(tt.wantBoundMethods, got.BoundMethods, cmp.AllowUnexported(Parameter{})))
//spew.Dump(tt.wantBoundMethods)
//spew.Dump(got.BoundMethods)
}