Skip to content

Commit

Permalink
Merge pull request #42 from p-x9/feature/symbol-section-test
Browse files Browse the repository at this point in the history
Add tests for `Symbol.sectionNumber`
  • Loading branch information
p-x9 authored Feb 6, 2024
2 parents dfb2e8d + 9a1f047 commit 88dfa6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/MachOKitTests/MachOFilePrintTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ final class MachOFilePrintTests: XCTestCase {
print("Stab:", stab)
}
}
if let sectionNumber = symbol.nlist.sectionNumber {
let section = machO.sections[sectionNumber - 1]
print("Section:", "\(section.segmentName).\(section.sectionName)")
}
if let description = symbol.nlist.symbolDescription {
print("SymbolDescription:", description.bits)
if let referenceFlag = description.referenceFlag {
Expand Down
4 changes: 4 additions & 0 deletions Tests/MachOKitTests/MachOPrintTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ final class MachOPrintTests: XCTestCase {
print("Stab:", stab)
}
}
if let sectionNumber = symbol.nlist.sectionNumber {
let section = machO.sections[sectionNumber - 1]
print("Section:", "\(section.segmentName).\(section.sectionName)")
}
if let description = symbol.nlist.symbolDescription {
print("SymbolDescription:", description.bits)
if let referenceFlag = description.referenceFlag {
Expand Down

0 comments on commit 88dfa6c

Please sign in to comment.