Skip to content

Update XCTestSuite comment to Swift #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions Sources/XCTest/XCTestSuite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,15 @@
// XCTestSuite.swift
// A collection of test cases.
//
// A subclass of XCTest, XCTestSuite is a collection of test cases. Based on
// what's passed into XCTMain(), a hierarchy of suites is built up, but
// XCTestSuite can also be instantiated and manipulated directly:
//
// let suite = XCTestSuite(name: "My Tests")
// suite.addTest(myTest)
// suite.testCaseCount // 1
// suite.run()

/// A concrete subclass of XCTest, XCTestSuite is a collection of test cases.
/// Suites are usually managed by the IDE, but XCTestSuite also provides API
/// for dynamic test and suite management:
///
/// XCTestSuite *suite = [XCTestSuite testSuiteWithName:@"My tests"];
/// [suite addTest:[MathTest testCaseWithSelector:@selector(testAdd)]];
/// [suite addTest:[MathTest testCaseWithSelector:@selector(testDivideByZero)]];
///
/// Alternatively, a test suite can extract the tests to be run automatically.
/// To do so, pass the class of your test case class to the suite's constructor:
///
/// XCTestSuite *suite = [XCTestSuite testSuiteForTestCaseClass:[MathTest class]];
///
/// This creates a suite with all the methods starting with "test" that take no
/// arguments. Also, a test suite of all the test cases found in the runtime
/// can be created automatically:
///
/// XCTestSuite *suite = [XCTestSuite defaultTestSuite];
///
/// This creates a suite of suites with all the XCTestCase subclasses methods
/// that start with "test" and take no arguments.
public class XCTestSuite: XCTest {
public private(set) var tests = [XCTest]()

Expand Down