add tests for reporterFromString(_:)

This commit is contained in:
JP Simard
2016-11-28 23:09:55 -08:00
parent 7d94f2b461
commit 51f4aa20be
@@ -11,6 +11,20 @@ import XCTest
class ReporterTests: XCTestCase {
func testReporterFromString() {
let reporters: [Reporter.Type] = [
XcodeReporter.self,
JSONReporter.self,
CSVReporter.self,
CheckstyleReporter.self,
JUnitReporter.self,
HTMLReporter.self
]
for reporter in reporters {
XCTAssertEqual(reporter.identifier, reporterFromString(reporter.identifier).identifier)
}
}
func generateViolations() -> [StyleViolation] {
let location = Location(file: "filename", line: 1, character: 2)
return [