Add tests for new compiler plugins

This commit is contained in:
Erik C. Thauvin 2025-03-21 11:35:12 -07:00
parent 5ca06f4d81
commit 54228e3149
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 9 additions and 2 deletions

2
.idea/misc.xml generated
View file

@ -9,6 +9,8 @@
<entry_point TYPE="field" FQNAME="rife.bld.extension.kotlin.CompilerPlugin NOARG" />
<entry_point TYPE="field" FQNAME="rife.bld.extension.kotlin.CompilerPlugin POWER_ASSERT" />
<entry_point TYPE="field" FQNAME="rife.bld.extension.kotlin.CompilerPlugin SAM_WITH_RECEIVER" />
<entry_point TYPE="field" FQNAME="rife.bld.extension.kotlin.CompilerPlugin COMPOSE" />
<entry_point TYPE="field" FQNAME="rife.bld.extension.kotlin.CompilerPlugin KOTLIN_IMPORTS_DUMPER" />
</entry_points>
<pattern value="rife.bld.extension.CompileKotlinOperationBuild" method="pmd" />
<pattern value="rife.bld.extension.kotlin.CompilerPlugin" />

View file

@ -104,9 +104,10 @@ class CompileKotlinOperationTest {
.testSourceFiles(List.of(new File("tfile3"), new File("tfile4")))
.testSourceFiles(new File("tfile5"), new File("tfile6"))
.plugins("plugin1", "plugin2")
.plugins(CompilerPlugin.KOTLIN_SERIALIZATION, CompilerPlugin.ASSIGNMENT)
.plugins(CompilerPlugin.KOTLIN_SERIALIZATION, CompilerPlugin.ASSIGNMENT, CompilerPlugin.COMPOSE)
.plugins(new File("lib/compile"), CompilerPlugin.LOMBOK, CompilerPlugin.POWER_ASSERT)
.plugins(Path.of("lib/compile"), CompilerPlugin.NOARG, CompilerPlugin.ALL_OPEN)
.plugins(Path.of("lib/compile"), CompilerPlugin.NOARG, CompilerPlugin.ALL_OPEN,
CompilerPlugin.KOTLIN_IMPORTS_DUMPER)
.plugins("lib/compile", CompilerPlugin.KOTLINX_SERIALIZATION, CompilerPlugin.SAM_WITH_RECEIVER)
.plugins(List.of("plugin3", "plugin4"));
@ -134,10 +135,12 @@ class CompileKotlinOperationTest {
softly.assertThat(op.plugins()).as("plugins").contains("plugin1", "plugin2", "plugin3", "plugin4",
"/kotlin_home/lib/kotlin-serialization-compiler-plugin.jar",
"/kotlin_home/lib/assignment-compiler-plugin.jar",
"/kotlin_home/lib/compose-compiler-plugin.jar",
new File("lib/compile", "lombok-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "power-assert-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "noarg-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "allopen-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "kotlin-imports-dumper-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "kotlinx-serialization-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "sam-with-receiver-compiler-plugin.jar").getAbsolutePath());
}
@ -315,6 +318,8 @@ class CompileKotlinOperationTest {
.fromProject(new BaseProject())
.plugins(CompilerPlugin.ALL_OPEN,
CompilerPlugin.ASSIGNMENT,
CompilerPlugin.COMPOSE,
CompilerPlugin.KOTLIN_IMPORTS_DUMPER,
CompilerPlugin.KOTLINX_SERIALIZATION,
CompilerPlugin.KOTLIN_SERIALIZATION,
CompilerPlugin.LOMBOK,