fix linux tests formatting (#13)
motivation: use consistent formatting changes: update generate_linux_tests to match the formatting rules we use: `swiftformat --self insert --patternlet inline --stripunusedargs unnamed-only --comments ignore`
This commit is contained in:
parent
c730d4e761
commit
feafca5bb9
|
|
@ -0,0 +1,10 @@
|
|||
# file options
|
||||
|
||||
# format options
|
||||
|
||||
--self insert
|
||||
--patternlet inline
|
||||
--stripunusedargs unnamed-only
|
||||
--comments ignore
|
||||
|
||||
# rules
|
||||
|
|
@ -23,8 +23,7 @@ import XCTest
|
|||
///
|
||||
|
||||
extension MetricsTests {
|
||||
|
||||
static var allTests : [(String, (MetricsTests) -> () throws -> Void)] {
|
||||
static var allTests: [(String, (MetricsTests) -> () throws -> Void)] {
|
||||
return [
|
||||
("testCounters", testCounters),
|
||||
("testCounterBlock", testCounterBlock),
|
||||
|
|
@ -42,4 +41,3 @@ extension MetricsTests {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ import XCTest
|
|||
///
|
||||
|
||||
extension MetricsExtensionsTests {
|
||||
|
||||
static var allTests : [(String, (MetricsExtensionsTests) -> () throws -> Void)] {
|
||||
static var allTests: [(String, (MetricsExtensionsTests) -> () throws -> Void)] {
|
||||
return [
|
||||
("testTimerBlock", testTimerBlock),
|
||||
("testTimerWithTimeInterval", testTimerWithTimeInterval),
|
||||
|
|
@ -32,4 +31,3 @@ extension MetricsExtensionsTests {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ def createExtensionFile(fileName, classes)
|
|||
file.write "\n"
|
||||
|
||||
for classArray in classes
|
||||
file.write 'extension ' + classArray[0] + " {\n\n"
|
||||
file.write ' static var allTests : [(String, (' + classArray[0] + ") -> () throws -> Void)] {\n"
|
||||
file.write 'extension ' + classArray[0] + " {\n"
|
||||
file.write ' static var allTests: [(String, (' + classArray[0] + ") -> () throws -> Void)] {\n"
|
||||
file.write " return [\n"
|
||||
|
||||
for funcName in classArray[1]
|
||||
|
|
@ -81,7 +81,7 @@ def createExtensionFile(fileName, classes)
|
|||
|
||||
file.write " ]\n"
|
||||
file.write " }\n"
|
||||
file.write "}\n\n"
|
||||
file.write "}\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue