Skip to content

Commit

Permalink
DRY: rely on Position.lineCaret
Browse files Browse the repository at this point in the history
  • Loading branch information
github-sebastien-boulet committed Oct 19, 2020
1 parent 35d1ba6 commit 367c004
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ case class AssertDelta(
sameKey(assert.key) &&
(assert.caretPosition match {
case Some(carPos) =>
(carPos.start == lintDiagnostic.position.start) &&
(carPos.end == lintDiagnostic.position.end ||
(carPos.start == (carPos.end - 1) && lintDiagnostic.position.start == lintDiagnostic.position.end)) &&
carPos.lineCaret == lintDiagnostic.position.lineCaret &&
assert.expectedMessage.forall(_.trim == lintDiagnostic.message.trim)
case None =>
sameLine(assert.anchorPosition)
Expand Down

0 comments on commit 367c004

Please sign in to comment.