Skip to content

Commit

Permalink
Fix SwiftPM builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Jun 1, 2020
1 parent 2a48c34 commit 7ba559a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Sources/Quick/Example.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,17 @@ final public class Example: _ExampleBase {
try closure()
} catch {
let description = "Test \(name) threw unexpected error: \(error.localizedDescription)"
QuickSpec.current.recordFailure(withDescription: description, inFile: callsite.file, atLine: Int(callsite.line), expected: false)
#if SWIFT_PACKAGE
let file = callsite.file.description
#else
let file = callsite.file
#endif
QuickSpec.current.recordFailure(
withDescription: description,
inFile: file,
atLine: Int(callsite.line),
expected: false
)
}

group!.phase = .aftersExecuting
Expand Down

0 comments on commit 7ba559a

Please sign in to comment.