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
Allow test methods to throw an error as an unexpected failure
Change the type of the function portion of XCTestCaseProvider.allTests to a
closure that throws, so that test methods are allowed to throw an error. The
only change this requires on clients' part is to adjust their declarations of
allTests.
When a test method does throw an error, treat that as an unexpected failure.
Addresses rdar://problem/23778435.
Copy file name to clipboardExpand all lines: Sources/XCTest/XCTestCaseProvider.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// This source file is part of the Swift.org open source project
2
2
//
3
-
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
3
+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
4
4
// Licensed under Apache License v2.0 with Runtime Library Exception
5
5
//
6
6
// See http://swift.org/LICENSE.txt for license information
@@ -13,6 +13,6 @@
13
13
14
14
publicprotocolXCTestCaseProvider{
15
15
// In the Objective-C version of XCTest, it is possible to discover all tests when the test is executed by asking the runtime for all methods and looking for the string "test". In Swift, we ask test providers to tell us the list of tests by implementing this property.
0 commit comments