File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ public final class PerformanceMeter {
190
190
}
191
191
192
192
private func recordFailures( ) {
193
- metrics. flatMap ( { $0. failureMessage ( ) } ) . forEach { message in
193
+ metrics. compactMap ( { $0. failureMessage ( ) } ) . forEach { message in
194
194
delegate. recordFailure ( description: message, file: invocationFile, line: invocationLine)
195
195
}
196
196
}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ private func moduleName(value: Any) -> String {
53
53
extension XCTestSuite : Listable {
54
54
private var listables : [ Listable ] {
55
55
return tests
56
- . flatMap ( { ( $0 as? Listable ) } )
56
+ . compactMap ( { ( $0 as? Listable ) } )
57
57
}
58
58
59
59
private var listingName : String {
@@ -69,7 +69,7 @@ extension XCTestSuite: Listable {
69
69
}
70
70
71
71
func dictionaryRepresentation( ) -> NSDictionary {
72
- let listedTests = NSArray ( array: tests. flatMap ( { ( $0 as? Listable ) ? . dictionaryRepresentation ( ) } ) )
72
+ let listedTests = NSArray ( array: tests. compactMap ( { ( $0 as? Listable ) ? . dictionaryRepresentation ( ) } ) )
73
73
return NSDictionary ( objects: [ NSString ( string: listingName) ,
74
74
listedTests] ,
75
75
forKeys: [ NSString ( string: " name " ) ,
@@ -80,7 +80,7 @@ extension XCTestSuite: Listable {
80
80
if name. hasSuffix ( " .xctest " ) {
81
81
return self
82
82
} else {
83
- return tests. flatMap ( { ( $0 as? XCTestSuite ) ? . findBundleTestSuite ( ) } ) . first
83
+ return tests. compactMap ( { ( $0 as? XCTestSuite ) ? . findBundleTestSuite ( ) } ) . first
84
84
}
85
85
}
86
86
}
You can’t perform that action at this time.
0 commit comments