 //  Base class for test cases
 //
 
+/// A block with the test code to be invoked when the test runs.
+///
+/// - Parameter testCase: the test case associated with the current test code.
+public typealias XCTestCaseClosure = (XCTestCase) throws -> Void
+
 /// This is a compound type used by `XCTMain` to represent tests to run. It combines an
 /// `XCTestCase` subclass type with the list of test case methods to invoke on the class.
 /// This type is intended to be produced by the `testCase` helper function.
 /// - seealso: `testCase`
 /// - seealso: `XCTMain`
-public typealias XCTestCaseEntry = (testCaseClass: XCTestCase.Type, allTests: [(String, (XCTestCase) throws -> Void)])
+public typealias XCTestCaseEntry = (testCaseClass: XCTestCase.Type, allTests: [(String, XCTestCaseClosure)])
 
 // A global pointer to the currently running test case. This is required in
 // order for XCTAssert functions to report failures.

    /// - Note: Like the designated initializer for Apple XCTest's XCTestCase,
    ///   `-[XCTestCase initWithInvocation:]`, it's rare for anyone outside of
    ///   XCTest itself to call this initializer.
    public required init(name: String, testClosure: @escaping (XCTestCase) throws -> Void) {
        _name = "\(type(of: self)).\(name)"
        self.testClosure = testClosure
    }

/// methods containing the tests to run.
/// - seealso: `XCTMain`
open class XCTestCase: XCTest {
    private let testClosure: XCTestCaseClosure

    /// The name of the test case, consisting of its class name and the method
    /// name it will run.
