Skip to content

Commit

Permalink
Stash the original _swift_reportFatalErrorsToDebugger value
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Jun 25, 2018
1 parent 40b0175 commit 13f2cc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/Nimble/Adapters/NimbleXCTestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ class NimbleXCTestUnavailableHandler: AssertionHandler {

private(set) var currentTestCase: XCTestCase?

private var stashed_swift_reportFatalErrorsToDebugger: Bool = false

@objc func testCaseWillStart(_ testCase: XCTestCase) {
#if swift(>=3.2)
stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger
_swift_reportFatalErrorsToDebugger = false
#endif

Expand All @@ -54,7 +57,7 @@ class NimbleXCTestUnavailableHandler: AssertionHandler {
currentTestCase = nil

#if swift(>=3.2)
_swift_reportFatalErrorsToDebugger = true
_swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger
#endif
}
}
Expand Down

0 comments on commit 13f2cc8

Please sign in to comment.