You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes to allow source-compatible tests and a new instance for each run
* Remove XCTestCase and XCTestCaseProvider protocols
* Add XCTestCase class so `setUp` and `tearDown` can be marked `override`
* Change `invokeTest` to be static and create new instances for each test
* Add a generic type-erasure function adapting a list of static method
references on a type to the required signature.
fatalError("Attempt to invoke test on class \(T.self) with incompatible instance type \(testCaseType.dynamicType)")
45
+
}
46
+
47
+
trytestFunc(testCase)()
48
+
}
17
49
}
18
50
19
51
extensionXCTestCase{
@@ -26,55 +58,55 @@ extension XCTestCase {
26
58
// TODO: When using the Objective-C runtime, XCTest is able to throw an exception from an assert and then catch it at the frame above the test method. This enables the framework to effectively stop all execution in the current test. There is no such facility in Swift. Until we figure out how to get a compatible behavior, we have decided to hard-code the value of 'true' for continue after failure.
0 commit comments