Skip to content

Commit d10e692

Browse files
authored
remove the module name from test identifiers and align options with Xcode (danielpaulus#397)
The test-to-skip argument was not working, while test-to-run was just fine (they are both using XCTTestIdentifier internally). One issue was that Xcode sets to options field to 2 and not 6 when both a class-name and a method-name are specified. Also, Xcode doesn't use the module parameter anymore.
1 parent abca6a2 commit d10e692

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ios/nskeyedarchiver/objectivec_classes.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,19 @@ func createTestIdentifierSet(productModuleName string, tests []string) XCTTestId
181181
}
182182
}
183183

184-
components := make([]string, 0, 3)
184+
components := make([]string, 0, 2)
185185

186-
module := matchedGroups["module"]
186+
// the `module` parameter is ingored here as it only works reliably with `testIdentifiersToRun`
187+
// adding the `module` parameter to `testIdentifiersToSkip` won't skip the specified tests there
188+
// this was verified with Xcode 15
189+
_ = matchedGroups["module"]
187190
clazz := matchedGroups["class"]
188191
method := matchedGroups["method"]
189192

190193
options := uint64(3)
191-
if len(module) > 0 {
192-
clazz = fmt.Sprintf("%s.%s", productModuleName, clazz)
193-
}
194194
components = append(components, clazz)
195195
if len(method) > 0 {
196-
options = 6
196+
options = 2
197197
components = append(components, method)
198198
}
199199

0 commit comments

Comments
 (0)