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:
tomer doron 2019-04-12 10:57:04 -07:00 committed by GitHub
parent c730d4e761
commit feafca5bb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 42 deletions

10
.swiftformat Normal file
View File

@ -0,0 +1,10 @@
# file options
# format options
--self insert
--patternlet inline
--stripunusedargs unnamed-only
--comments ignore
# rules

View File

@ -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 {
]
}
}

View File

@ -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 {
]
}
}

View File

@ -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