Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelpasterz committed Apr 8, 2021
1 parent 05288e9 commit d7437c4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions test_runner/src/main/kotlin/ftl/ios/xctest/XcTestData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,14 @@ private fun IosArgs.useCustomShardingV1(dictionary: NSDictionary) =
private fun IosArgs.useCustomShardingV2(dictionary: NSDictionary) =
customShardingJson.isNotBlank() && dictionary.getXcTestRunVersion() == V2

private fun IosArgs.shardsFromV1() =
createCustomSharding<List<XctestrunMethods>>(commonArgs.customShardingJson)
private fun IosArgs.shardsFromV1() = mapOf(
"" to createCustomSharding<List<XctestrunMethods>>(commonArgs.customShardingJson)
.run {
mapOf(
"" to run {
map { xcMethods ->
Chunk(xcMethods.values.flatMap { it.map(::TestMethod) })
} to this
}
)
map { xcMethods ->
Chunk(xcMethods.values.flatMap { it.map(::TestMethod) })
} to this
}
)

private fun IosArgs.shardsFromV2() =
createCustomSharding<Map<String, List<XctestrunMethods>>>(commonArgs.customShardingJson)
Expand Down

0 comments on commit d7437c4

Please sign in to comment.