in Sources/XCTest/Public/XCTestRun.swift [154:177]
func recordSkip(description: String, sourceLocation: SourceLocation?) {
func failureLocation() -> String {
if let sourceLocation = sourceLocation {
return "\(test.name) (\(sourceLocation.file):\(sourceLocation.line))"
} else {
return "\(test.name)"
}
}
guard isStarted else {
fatalError("Invalid attempt to record a skip for a test run " +
"that has not yet been started: \(failureLocation())")
}
guard !hasBeenSkipped else {
fatalError("Invalid attempt to record a skip for a test run " +
"that has already been skipped: \(failureLocation())")
}
guard !isStopped else {
fatalError("Invalid attempt to record a skip for a test run " +
"has already been stopped: \(failureLocation())")
}
hasBeenSkipped = true
}