Skip to content

Commit ac259c9

Browse files
committed
wip
1 parent 56bbc02 commit ac259c9

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

Sources/IssueReporting/Internal/SwiftTesting.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,16 @@ func _withKnownIssue(
128128
return
129129
}
130130

131-
let withKnownIssue = function as! @Sendable (String?, Bool, () throws -> Void) -> Void
132-
withKnownIssue(message, isIntermittent, body)
131+
let withKnownIssue = function as! @Sendable (
132+
String?,
133+
Bool,
134+
String,
135+
String,
136+
Int,
137+
Int,
138+
() throws -> Void
139+
) -> Void
140+
withKnownIssue(message, isIntermittent, fileID, filePath, line, column, body)
133141
}
134142

135143
@usableFromInline

Sources/IssueReporting/WithExpectedIssue.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public func withExpectedIssue(
4747
_withKnownIssue(
4848
message,
4949
isIntermittent: isIntermittent,
50+
fileID: fileID.description,
51+
filePath: filePath.description,
52+
line: Int(line),
53+
column: Int(column),
5054
body
5155
)
5256
case .xcTest:

Sources/IssueReportingTestSupport/SwiftTesting.swift

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,24 @@ public func _withKnownIssue() -> Any { __withKnownIssue }
4343
private func __withKnownIssue(
4444
_ message: String?,
4545
isIntermittent: Bool,
46-
// TODO: fileID, filePath, ...
46+
fileID: String,
47+
filePath: String,
48+
line: Int,
49+
column: Int,
4750
_ body: () throws -> Void
4851
) {
4952
#if canImport(Testing)
50-
withKnownIssue(message.map(Comment.init(rawValue:)), isIntermittent: isIntermittent, body)
53+
withKnownIssue(
54+
message.map(Comment.init(rawValue:)),
55+
isIntermittent: isIntermittent,
56+
sourceLocation: SourceLocation(
57+
fileID: fileID,
58+
filePath: filePath,
59+
line: line,
60+
column: column
61+
),
62+
body
63+
)
5164
#endif
5265
}
5366

0 commit comments

Comments
 (0)