Skip to content

Commit

Permalink
Merge pull request #107 from scalameta/fix-check-symbol-index
Browse files Browse the repository at this point in the history
Fix checkSymbolIndex to be independent of the order files are listed
  • Loading branch information
jonas authored Oct 5, 2018
2 parents d38932c + 063f152 commit 3175406
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ class BaseMetadocCliSuite
out.resolve("symbol").resolve(id.symbolIndexPath)
)
val index = indexes.indexes.find(_.symbol == id).get
val obtained = index.toProtoString
// Sort ranges to ensure we assert against deterministic input.
val indexNormalized = index.copy(
references = index.references.mapValues { ranges =>
ranges.copy(ranges = ranges.ranges.sortBy(_.startLine))
}
)
val obtained = indexNormalized.toProtoString
assertNoDiffOrPrintExpected(obtained, expected)
}
}
Expand Down

0 comments on commit 3175406

Please sign in to comment.