Skip to content

Commit

Permalink
Merge pull request #28 from farzadshbfn/master
Browse files Browse the repository at this point in the history
Increase CodeCov
  • Loading branch information
wokalski authored Dec 10, 2016
2 parents f564aa4 + 04067b8 commit 1091e96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions DiffTests/DiffTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ class DiffTests: XCTestCase {

func testTracesOutOfBounds() {
for expectation in expectations {
if tracesOutOfBounds(from: expectation.0, to: expectation.1) != [] {
XCTFail("traces out of bounds for \(expectation.0) -> \(expectation.1)")
}
XCTAssertEqual(tracesOutOfBounds(from: expectation.0, to: expectation.1), [], "traces out of bounds for \(expectation.0) -> \(expectation.1)")
}
}

Expand Down
1 change: 1 addition & 0 deletions DiffTests/ExtendedPatchSortTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class ExtendedPatchSortTests: XCTestCase {
let expectations = [
("gitten", "sitting", "D(4)M(0,4)I(0,s)I(4,i)"),
("1362", "31526", "M(0,2)M(1,3)I(2,5)"),
("a1b2c3pq", "3sa1cz2rb", "D(7)D(6)M(5,0)M(3,5)M(3,4)I(1,s)I(5,z)I(7,r)"),
]

let sort: ExtendedSortingFunction = { fst, snd in
Expand Down
10 changes: 4 additions & 6 deletions DiffTests/PatchSortTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ class PatchTests: XCTestCase {
switch (element1, element2) {
case (.insert(let at1), .insert(let at2)):
return at1 < at2
case (.insert, .delete):
case (.insert(_), .delete(_)):
return true
case (.delete, .insert):
case (.delete(_), .insert(_)):
return false
case (.delete(let at1), .delete(let at2)):
return at1 < at2
default: fatalError()
}
}

Expand Down Expand Up @@ -93,13 +92,12 @@ class PatchTests: XCTestCase {
switch (element1, element2) {
case (.insert(let at1), .insert(let at2)):
return at1 < at2
case (.insert, .delete):
case (.insert(_), .delete(_)):
return false
case (.delete, .insert):
case (.delete(_), .insert(_)):
return true
case (.delete(let at1), .delete(let at2)):
return at1 < at2
default: fatalError()
}
}

Expand Down

0 comments on commit 1091e96

Please sign in to comment.