Skip to content

Commit 32e23fb

Browse files
authored
Merge pull request #152 from phausler/bridge_reduction
Reduce dependency on the bridge() API since it will be changing shortly
2 parents 92ef306 + ec0a26c commit 32e23fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/XCTest/Private/TestListing.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ extension XCTestSuite: Listable {
7575
}
7676

7777
func dictionaryRepresentation() -> NSDictionary {
78-
let listedTests = tests.flatMap({ ($0 as? Listable)?.dictionaryRepresentation() })
79-
return [
80-
"name": listingName.bridge(),
81-
"tests": listedTests.bridge()
82-
].bridge()
78+
let listedTests = NSArray(array: tests.flatMap({ ($0 as? Listable)?.dictionaryRepresentation() }))
79+
return NSDictionary(objects: [NSString(string: listingName),
80+
listedTests],
81+
forKeys: [NSString(string: "name"),
82+
NSString(string: "tests")])
8383
}
8484

8585
func findBundleTestSuite() -> XCTestSuite? {
@@ -102,6 +102,6 @@ extension XCTestCase: Listable {
102102

103103
func dictionaryRepresentation() -> NSDictionary {
104104
let methodName = String(name.characters.split(separator: ".").last!)
105-
return ["name": methodName].bridge()
105+
return NSDictionary(object: NSString(string: methodName), forKey: NSString(string: "name"))
106106
}
107107
}

0 commit comments

Comments
 (0)