Skip to content

Commit 6913f61

Browse files
committed
Merge pull request #100 from jonallured/update-docs
Update XCTestSuite comment to Swift
2 parents efdde98 + d9ec97b commit 6913f61

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

Sources/XCTest/XCTestSuite.swift

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,15 @@
1010
// XCTestSuite.swift
1111
// A collection of test cases.
1212
//
13+
// A subclass of XCTest, XCTestSuite is a collection of test cases. Based on
14+
// what's passed into XCTMain(), a hierarchy of suites is built up, but
15+
// XCTestSuite can also be instantiated and manipulated directly:
16+
//
17+
// let suite = XCTestSuite(name: "My Tests")
18+
// suite.addTest(myTest)
19+
// suite.testCaseCount // 1
20+
// suite.run()
1321

14-
/// A concrete subclass of XCTest, XCTestSuite is a collection of test cases.
15-
/// Suites are usually managed by the IDE, but XCTestSuite also provides API
16-
/// for dynamic test and suite management:
17-
///
18-
/// XCTestSuite *suite = [XCTestSuite testSuiteWithName:@"My tests"];
19-
/// [suite addTest:[MathTest testCaseWithSelector:@selector(testAdd)]];
20-
/// [suite addTest:[MathTest testCaseWithSelector:@selector(testDivideByZero)]];
21-
///
22-
/// Alternatively, a test suite can extract the tests to be run automatically.
23-
/// To do so, pass the class of your test case class to the suite's constructor:
24-
///
25-
/// XCTestSuite *suite = [XCTestSuite testSuiteForTestCaseClass:[MathTest class]];
26-
///
27-
/// This creates a suite with all the methods starting with "test" that take no
28-
/// arguments. Also, a test suite of all the test cases found in the runtime
29-
/// can be created automatically:
30-
///
31-
/// XCTestSuite *suite = [XCTestSuite defaultTestSuite];
32-
///
33-
/// This creates a suite of suites with all the XCTestCase subclasses methods
34-
/// that start with "test" and take no arguments.
3522
public class XCTestSuite: XCTest {
3623
public private(set) var tests = [XCTest]()
3724

0 commit comments

Comments
 (0)