File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 107107;; This pattern allows users to mark indirect subclasses (MyTests <- MyTestsBase <- XCTestCase)
108108;; by adding a "// @XCTestClass" comment before the class declaration.
109109(
110- (source_file
111- (comment) @_marker (#match? @_marker ".*@XCTestClass. *")
112- (class_declaration
113- name: (type_identifier) @SWIFT_TEST_CLASS
114- )
110+ (comment) @_marker (#match? @_marker ".*@XCTestClass. *")
111+ (class_declaration
112+ name: (type_identifier) @SWIFT_TEST_CLASS @run
115113 ) @_swift -xctest-class
116114 (#set! tag swift-xctest-class)
117115)
118116
119117;; Test function within comment-annotated XCTest class
120118(
121- (source_file
122- (comment) @_marker (#match? @_marker ".*@XCTestClass. *")
123- (class_declaration
124- name: (type_identifier) @SWIFT_TEST_CLASS
125- body: (class_body
126- (function_declaration
127- name: (simple_identifier) @_name @SWIFT_TEST_FUNC @run (#match? @run "^test")
128- )
119+ (comment) @_marker (#match? @_marker ".*@XCTestClass. *")
120+ (class_declaration
121+ name: (type_identifier) @SWIFT_TEST_CLASS
122+ body: (class_body
123+ (function_declaration
124+ name: (simple_identifier) @_name @SWIFT_TEST_FUNC @run (#match? @run "^test")
129125 )
130126 )
131127 ) @_swift -xctest-func
You can’t perform that action at this time.
0 commit comments