run LinterCacheTests on Linux

This commit is contained in:
JP Simard
2017-01-10 15:47:45 -08:00
parent 86214a7758
commit 41251d8bb1
2 changed files with 19 additions and 3 deletions
+4 -3
View File
@@ -20,13 +20,14 @@ XCTMain([
testCase(IntegrationTests.allTests),
testCase(LineLengthConfigurationTests.allTests),
testCase(LineLengthRuleTests.allTests),
testCase(LinterCacheTests.allTests),
testCase(ReporterTests.allTests),
testCase(RuleConfigurationsTests.allTests),
testCase(RuleTests.allTests),
testCase(RulesTests.allTests),
testCase(RuleTests.allTests),
testCase(SourceKitCrashTests.allTests),
testCase(TrailingCommaRuleTests.allTests),
testCase(VerticalWhitespaceRuleTests.allTests),
testCase(YamlSwiftLintTests.allTests),
testCase(YamlParserTests.allTests)
testCase(YamlParserTests.allTests),
testCase(YamlSwiftLintTests.allTests)
])
@@ -87,3 +87,18 @@ class LinterCacheTests: XCTestCase {
XCTAssertNil(cachedViolations)
}
}
extension LinterCacheTests {
static var allTests: [(String, (LinterCacheTests) -> () throws -> Void)] {
return [
("testInitThrowsWhenUsingDifferentVersion", testInitThrowsWhenUsingDifferentVersion),
("testInitThrowsWhenUsingInvalidCacheFormat", testInitThrowsWhenUsingInvalidCacheFormat),
("testInitThrowsWhenUsingDifferentConfiguration", testInitThrowsWhenUsingDifferentConfiguration),
("testInitSucceeds", testInitSucceeds),
("testInitSucceedsWithConfigurationHash", testInitSucceedsWithConfigurationHash),
("testParsesViolations", testParsesViolations),
("testParsesViolationsWithModifiedHash", testParsesViolationsWithModifiedHash),
("testParsesViolationsWithEmptyViolations", testParsesViolationsWithEmptyViolations)
]
}
}