-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Support #769
base: main
Are you sure you want to change the base?
Windows Support #769
Changes from all commits
ed06601
8f00f4e
b3711f5
b2d02cd
3288433
8fa7cfd
ded59b2
8157d4e
2f8a9f6
4272c79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,14 @@ class ClangTranslationUnitTests: XCTestCase { | |
} | ||
|
||
private func compare(clangFixture fixture: String) { | ||
let unit = ClangTranslationUnit(headerFiles: [fixturesDirectory + fixture + ".h"], | ||
compilerArguments: ["-x", "objective-c", "-isysroot", sdkPath(), "-I", fixturesDirectory]) | ||
let path = URL(fileURLWithPath: fixturesDirectory + fixture + ".h") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pattern is used a lot now: Can you add some sort of shared helper for this? Open to API design ideas, but as a strawman: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that the |
||
.standardizedFileURL | ||
.withUnsafeFileSystemRepresentation { String(cString: $0!) } | ||
let includes = URL(fileURLWithPath: fixturesDirectory) | ||
.standardizedFileURL | ||
.withUnsafeFileSystemRepresentation { String(cString: $0!) } | ||
let unit = ClangTranslationUnit(headerFiles: [path], | ||
compilerArguments: ["-x", "objective-c", "-isysroot", sdkPath(), "-I", includes]) | ||
compareJSONString(withFixtureNamed: (fixture as NSString).lastPathComponent, jsonString: unit) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"key.annotated_decl" : "<Declaration>struct DocumentedStruct<\/Declaration>", | ||
"key.column" : 8, | ||
"key.decl_lang" : "source.lang.swift", | ||
"key.doc.full_as_xml" : "<Class file=\"DocInfo.swift\" line=\"28\" column=\"8\"><Name>DocumentedStruct<\/Name><USR>s:7DocInfo16DocumentedStructV<\/USR><Declaration>struct DocumentedStruct<\/Declaration><CommentParts><Abstract><Para>A documented struct<\/Para><\/Abstract><\/CommentParts><\/Class>", | ||
"key.filepath" : "DocInfo.swift", | ||
"key.fully_annotated_decl" : "<decl.struct><syntaxtype.keyword>struct<\/syntaxtype.keyword> <decl.name>DocumentedStruct<\/decl.name><\/decl.struct>", | ||
"key.kind" : "source.lang.swift.decl.struct", | ||
"key.length" : 16, | ||
"key.line" : 28, | ||
"key.modulename" : "DocInfo", | ||
"key.name" : "DocumentedStruct", | ||
"key.offset" : 416, | ||
"key.reusingastcontext" : false, | ||
"key.typename" : "DocumentedStruct.Type", | ||
"key.typeusr" : "$s7DocInfo16DocumentedStructVmD", | ||
"key.usr" : "s:7DocInfo16DocumentedStructV" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.