Skip to content

Commit

Permalink
Fix #445 codestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Goldin committed Jun 3, 2019
1 parent 3cdc39b commit 87c5b67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
17 changes: 5 additions & 12 deletions MacawTests/MacawSVGTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ class MacawSVGTests: XCTestCase {
XCTFail("No file \(referenceFile)")
}
} catch {
print(error)
XCTFail()
XCTFail(error.localizedDescription)
}
}

Expand All @@ -62,8 +61,7 @@ class MacawSVGTests: XCTestCase {
let node = try SVGParser.parse(resource: testResource, fromBundle: bundle)
validate(node: node, referenceFile: testResource)
} catch {
print(error)
XCTFail()
XCTFail(error.localizedDescription)
}
}

Expand All @@ -85,8 +83,7 @@ class MacawSVGTests: XCTestCase {
let path = bundle.bundlePath + "/" + name + ".reference"
try result.write(to: URL(fileURLWithPath: path), atomically: true, encoding: String.Encoding.utf8)
} catch {
print(error)
XCTFail()
XCTFail(error.localizedDescription)
}
}

Expand Down Expand Up @@ -203,8 +200,6 @@ class MacawSVGTests: XCTestCase {
let nodeContent = String(data: getJSONData(node: node), encoding: String.Encoding.utf8)

if nodeContent != referenceContent {
//let referencePath = writeToFile(string: referenceContent, fileName: referenceFile + "_reference.txt")
//let _ = writeToFile(string: nodeContent!, fileName: referenceFile + "_incorrect.txt")
XCTFail("nodeContent is not equal to referenceContent")
}

Expand Down Expand Up @@ -300,7 +295,6 @@ class MacawSVGTests: XCTestCase {
return Data()
}
do {

#if os(OSX)
if #available(OSX 10.13, *) {
return try JSONSerialization.data(withJSONObject: serializableNode.toDictionary(), options: [.prettyPrinted, .sortedKeys])
Expand All @@ -316,8 +310,6 @@ class MacawSVGTests: XCTestCase {
return try JSONSerialization.data(withJSONObject: serializableNode.toDictionary(), options: .prettyPrinted)
}
#endif


} catch {
XCTFail(error.localizedDescription)
return Data()
Expand Down Expand Up @@ -348,7 +340,7 @@ class MacawSVGTests: XCTestCase {
try data.write(to: path)
return path
} catch {
print(error.localizedDescription)
XCTFail(error.localizedDescription)
return .none
}
}
Expand Down Expand Up @@ -838,6 +830,7 @@ class MacawSVGTests: XCTestCase {
try FileManager.default.createDirectory(at: testDirectoryPath, withIntermediateDirectories: true, attributes: .none)
}
} catch {
XCTFail(error.localizedDescription)
return
}
}
Expand Down
6 changes: 0 additions & 6 deletions TestingApp/Podfile

This file was deleted.

0 comments on commit 87c5b67

Please sign in to comment.