Skip to content

Commit

Permalink
chore(test): map paths to realpath before removing from collection
Browse files Browse the repository at this point in the history
  • Loading branch information
guicamest committed Dec 27, 2023
1 parent 149f018 commit 795a9b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class StopResumeTest {
.hasSize(1)
assertThat(contentStates[1].processedFiles.map { it.path })
.withPathComparator()
.containsExactlyInAnyOrderElementsOf(paths - leftToProcess.toSet())
.containsExactlyInAnyOrderElementsOf(paths.without(leftToProcess))
.hasSize(1)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ private class PathComparator : Comparator<Path> {
o2: Path,
): Int = o1.toRealPath().compareTo(o2.toRealPath())
}

fun Collection<Path>.without(leftToProcess: List<Path>): Collection<Path> =
map { it.toRealPath() } - leftToProcess.toSet()

0 comments on commit 795a9b4

Please sign in to comment.