Skip to content

Commit

Permalink
chore: working on swift
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Oct 2, 2023
1 parent b398e85 commit 3c7a181
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,13 +667,35 @@ func TestNewFileWithSwift(t *testing.T) {
return
}

// if refStrs, err := got.GetSwiftReflectionStrings(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
// t.Fatalf("GetSwiftReflectionStrings() error = %v", err)
// } else {
// for addr, refstr := range refStrs {
// fmt.Printf("%#x: %s\n", addr, refstr)
// }
// }
if entry, err := got.GetSwiftEntry(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
t.Fatalf("GetSwiftReflectionStrings() error = %v", err)
} else {
fmt.Printf("%#x: entry\n", entry)
}

if refStrs, err := got.GetSwiftTypeRefs(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
t.Fatalf("GetSwiftReflectionStrings() error = %v", err)
} else {
for addr, refstr := range refStrs {
fmt.Printf("%#x: %s\n", addr, refstr)
}
}

if typs, err := got.GetSwiftTypes(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
t.Fatalf("GetSwiftTypes() error = %v", err)
} else {
for _, t := range typs {
fmt.Println(t)
}
}

if refStrs, err := got.GetSwiftReflectionStrings(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
t.Fatalf("GetSwiftReflectionStrings() error = %v", err)
} else {
for addr, refstr := range refStrs {
fmt.Printf("%#x: %s\n", addr, refstr)
}
}

if prots, err := got.GetSwiftProtocols(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
t.Fatalf("GetSwiftProtocols() error = %v", err)
Expand Down Expand Up @@ -732,14 +754,6 @@ func TestNewFileWithSwift(t *testing.T) {
fmt.Println(rep)
}
}

if typs, err := got.GetSwiftTypes(); err != nil && !errors.Is(err, ErrSwiftSectionError) {
t.Fatalf("GetSwiftTypes() error = %v", err)
} else {
for _, t := range typs {
fmt.Println(t)
}
}
}

func TestNewFileWithObjC(t *testing.T) {
Expand Down

0 comments on commit 3c7a181

Please sign in to comment.