Instance Method

recordFailure(withDescription:inFile:atLine:expected:)

Records a failure in the execution of the test.

Declaration

func recordFailure(withDescription description: String, inFile filePath: String, atLine lineNumber: Int, expected: Bool)

Parameters

description

A description of the failure being reported.

filePath

The file path to the source file where the failure being reported was encountered.

lineNumber

The line number in the source file at filePath where the failure being reported was encountered.

expected

true if the failure being reported was the result of a failed assertion, false if it was the result of an uncaught exception.

Discussion

Used by all test assertions to record test failures.

See Also

Creating Tests Programmatically

class var testInvocations: [NSInvocation]

Returns an array of invocations representing each test method in the test case.

var invocation: NSInvocation?

The invocation used when this test is run.

func invokeTest()

Invokes the test.

class var defaultTestSuite: XCTestSuite

A test suite containing test cases for all of the tests in the class.