Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix codestyle issues
Browse files Browse the repository at this point in the history
Alexey Fayzullov committed Feb 12, 2018
1 parent 10a5c08 commit cfc5cca
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/xcprojTests/XCTestCase+Assertions.swift
Original file line number Diff line number Diff line change
@@ -2,15 +2,16 @@ import Foundation
import XCTest

extension XCTestCase {
typealias EquatableError = Error & Equatable

func XCTAssertNotNilAndUnwrap<T>(_ obj: T?, message: String = "") -> T {
guard let unwrappedObj = obj else {
XCTAssertNotNil(obj, message)
fatalError() // Unreachable since the above assertion will fail
}
return unwrappedObj
}

typealias EquatableError = Error & Equatable

func XCTAssertThrowsSpecificError<T, E: EquatableError>(_ expression: @autoclosure () throws -> T, _ error: E, _ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line) {
XCTAssertThrowsError(expression, message, file: file, line: line) { actualError in
let message = "Expected \(error) got \(actualError)"
1 change: 1 addition & 0 deletions Tests/xcprojTests/XcodeProjIntegrationSpec.swift
Original file line number Diff line number Diff line change
@@ -322,6 +322,7 @@ final class XcodeProjIntegrationSpec: XCTestCase {

// This could be code generated (e.g. using sourcery)
extension XCodeProjEditingError: Equatable {

static public func == (lhs: XCodeProjEditingError, rhs: XCodeProjEditingError) -> Bool {
switch (lhs, rhs) {
case (.unsupportedFileType(let path1), .unsupportedFileType(let path2)):

0 comments on commit cfc5cca

Please sign in to comment.