Structures
The following structures are available globally.
-
A proxy for the current testing context.
See moreDeclaration
Swift
public struct XCTContextHylo : Sendable -
A test annotation in a source file.
Test annotations are parsed from comments in the source. They are composed of a command with, optionally, an argument and/or line offset.
//! <offset> <command> <argument>The character sequence
//!is recognized as an annotation line opener, unless it is already part of a comment. The characters between//!and the next new line form an annotation body. For example://! @+1 line-annotation a b c foo()The line offset of the annotation is
+1, its command isline-annotationand its argument is the string “a b c” (without quotes).The character sequence
/*!is recognized as an annotation block opener, unless it is already part of a comment. The block terminates immediately after a matching multiline comment closing delimiter (i.e.,*/). The sequence of characters that starts immediately after an annotation block opener and the corresponding comment closing delimiter form an annotation body.An annotation body corresponds to a single annotation. When present, the line offset is parsed as a natural number prefixed by either
@+or@-. The next sequence of non-whitespace characters is parsed as the command. Preceding whitespaces are ignored; following whitespaces are ignored only if they are on the same line as the command. The remainder of the annotation body is parsed as the argument.If the argument starts on a different line than the command, the spaces before the first non-space first non-space character of the argument defines the indentation pattern of the argument and are not part of its value. Each line of an argument must be prefixed by the its indentation pattern.
/*! cpp struct Foo { int bar; }; */The command of the annotation is
See morecppand the argument is a C++ struct declaration with no indentation on the first and last line, and two spaces before the field declaration..Declaration
Swift
public struct TestAnnotation : Hashable -
An object that represents a test failure.
See more -
An object that contains call stack and source code location details to provide context for a point of execution in a test.
See more -
A named substep of a test method.
See moreDeclaration
Swift
public struct XCTActivityHylo : Sendable
View on GitHub
Structures Reference