Skip to content

Commit

Permalink
Another attempt at predictable test class order
Browse files Browse the repository at this point in the history
  • Loading branch information
gershnik committed May 3, 2024
1 parent 237016a commit f015bfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jnigen/kprocessor/test/src/KJniGenTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class KJniGenTest {
@MethodSource("inputDirectories")
fun generateOutput(name: String, dir: Path) {
val sources = Files.list(dir / "input")
.filter { setOf("kt", "java").contains(it.extension)}.sorted()
.filter { setOf("kt", "java").contains(it.extension)}
.sorted(compareBy { it.fileName.toString() })
.map { SourceFile.fromPath(it.toFile()) }.toList()

val args = loadArguments(dir / "args.properties")
Expand Down
3 changes: 2 additions & 1 deletion jnigen/processor/test/src/JniGenTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class JniGenTest {
@MethodSource("inputDirectories")
fun generateOutput(name: String, dir: Path) {
val sources = Files.list(dir / "input")
.filter { setOf("kt", "java").contains(it.extension)}.sorted()
.filter { setOf("kt", "java").contains(it.extension)}
.sorted(compareBy { it.fileName.toString() })
.map { SourceFile.fromPath(it.toFile()) }.toList()

val args = loadArguments(dir / "args.properties")
Expand Down

0 comments on commit f015bfe

Please sign in to comment.