Skip to content

Commit

Permalink
Fix breaking unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbutler committed Apr 28, 2020
1 parent df2aea2 commit 2f375a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Updates/Classes/Core/Updates+Internal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,20 @@ extension Updates {
// Pad out the array to make equal in length
lhsComponents = padLHSWithZeroes(lhs: lhsComponents, rhs: rhsComponents)
rhsComponents = padLHSWithZeroes(lhs: rhsComponents, rhs: lhsComponents)
guard semanticVersioningComponents.contains(comparator) else {
for (lhsComponent, rhsComponent) in zip(lhsComponents, rhsComponents) {
result = comparisonResult(lhs: lhsComponent, rhs: rhsComponent)
if result != .orderedSame {
break
}
}
return result
}
var counter = 0
for (lhsComponent, rhsComponent) in zip(lhsComponents, rhsComponents) {
guard counter < semanticVersioningComponents.count else {
break
}
let semanticComponent = semanticVersioningComponents[counter]
guard semanticComponent.rawValue <= comparator.rawValue else {
break
Expand Down

0 comments on commit 2f375a6

Please sign in to comment.