diff --git a/Difference.xcodeproj/project.pbxproj b/Difference.xcodeproj/project.pbxproj index 92e3150..05660da 100644 --- a/Difference.xcodeproj/project.pbxproj +++ b/Difference.xcodeproj/project.pbxproj @@ -53,8 +53,6 @@ 8933C7891EB5B82A000D00A4 /* DifferenceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DifferenceTests.swift; sourceTree = ""; }; AD2FAA261CD0B6D800659CF4 /* Difference.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Difference.plist; sourceTree = ""; }; AD2FAA281CD0B6E100659CF4 /* DifferenceTests.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DifferenceTests.plist; sourceTree = ""; }; - CDF9A0C21F979B83004A5C4A /* XCTAssertions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTAssertions.swift; sourceTree = ""; }; - CDF9A0C71F979EA5004A5C4A /* QuickAssertions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickAssertions.swift; sourceTree = ""; }; DD75027A1C68FCFC006590AF /* Difference-macOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Difference-macOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; DD75028D1C690C7A006590AF /* Difference-tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Difference-tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -152,8 +150,6 @@ isa = PBXGroup; children = ( 8933C7841EB5B820000D00A4 /* Difference.swift */, - CDF9A0C21F979B83004A5C4A /* XCTAssertions.swift */, - CDF9A0C71F979EA5004A5C4A /* QuickAssertions.swift */, ); path = Sources; sourceTree = ""; diff --git a/Sources/QuickAssertions.swift b/Sources/QuickAssertions.swift deleted file mode 100644 index 9c49dc1..0000000 --- a/Sources/QuickAssertions.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// QuickAssertions.swift -// Difference -// -// Created by Krzysztof Zablocki on 18/10/2017. -// Copyright © 2017 Difference. All rights reserved. -// - -import Foundation -import Quick -import Nimble - -public func equalDiff(_ otherObject: T?) -> Predicate { - return Predicate.define { actualExpression in - guard let otherObject = otherObject else { - return PredicateResult(status: .fail, message: ExpectationMessage.fail("").appendedBeNilHint()) - } - - let object = try actualExpression.evaluate() - - return PredicateResult(bool: object != otherObject, message: ExpectationMessage.fail("Found difference for " + diff(object, otherObject).joined(separator: ", "))) - } -} diff --git a/Sources/XCTAssertions.swift b/Sources/XCTAssertions.swift deleted file mode 100644 index bc0079a..0000000 --- a/Sources/XCTAssertions.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// XCTAssertions.swift -// Difference -// -// Created by Krzysztof Zablocki on 18/10/2017. -// Copyright © 2017 Difference. All rights reserved. -// - -import Foundation -import XCTest -import Difference - -/// Asserts objects are equal and prints difference if they aren't -/// -/// - Parameters: -/// - expected: Expected object -/// - received: Received object -/// - file: File the assertion should show at -/// - line: Line the assertion should show at -public func AssertEqual(_ expected: T, _ received: T, file: StaticString = #file, line: UInt = #line) { - XCTAssertTrue(expected == received, "Found difference for " + diff(expected, received).joined(separator: ", "), file: file, line: line) -}