File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ final class TestDiscoveryCommand: CustomLLBuildCommand {
54
54
) throws {
55
55
let stream = try LocalFileOutputByteStream ( path)
56
56
57
- let testsByClass = Dictionary ( grouping: tests, by: { $0. name } )
57
+ let testsByClassNames = Dictionary ( grouping: tests, by: { $0. name } ) . sorted ( by : { $0 . key < $1 . key } )
58
58
59
59
stream <<< " import XCTest " <<< " \n "
60
60
stream <<< " @testable import " <<< module <<< " \n "
61
61
62
- for classTests in testsByClass {
63
- let className = classTests . key
64
- let testMethods = classTests . value. flatMap { $0. methods }
62
+ for iterator in testsByClassNames {
63
+ let className = iterator . key
64
+ let testMethods = iterator . value. flatMap { $0. methods }
65
65
stream <<< " \n "
66
66
stream <<< " fileprivate extension " <<< className <<< " { " <<< " \n "
67
67
stream <<< indent ( 4 ) <<< " static let __allTests__ \( className) = [ " <<< " \n "
@@ -78,7 +78,8 @@ final class TestDiscoveryCommand: CustomLLBuildCommand {
78
78
return [ \n
79
79
"""
80
80
81
- for className in testsByClass. keys {
81
+ for iterator in testsByClassNames {
82
+ let className = iterator. key
82
83
stream <<< indent ( 8 ) <<< " testCase( \( className) .__allTests__ \( className) ), \n "
83
84
}
84
85
You can’t perform that action at this time.
0 commit comments