splash/Tests/SplashTests/Core/XCTestCase+TestNames.swift

22 lines
425 B
Swift
Raw Normal View History

2018-08-24 18:42:07 +02:00
/**
* Splash
* Copyright (c) John Sundell 2018
* MIT license - see LICENSE.md
*/
import Foundation
import XCTest
#if os(macOS)
extension XCTestCase {
static var testNames: [String] {
return defaultTestSuite.tests.map { test in
let components = test.name.components(separatedBy: .whitespaces)
return components[1].replacingOccurrences(of: "]", with: "")
}
}
}
#endif