Added more tests

This commit is contained in:
Erik C. Thauvin 2023-11-16 10:55:17 -08:00
parent 200479e1c1
commit 46e81b5928
4 changed files with 9 additions and 4 deletions

1
.idea/misc.xml generated
View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="EntryPointsManager"> <component name="EntryPointsManager">
<pattern value="rife.bld.extension.CompileKotlinOperationBuild" method="pmd" /> <pattern value="rife.bld.extension.CompileKotlinOperationBuild" method="pmd" />

View file

@ -462,7 +462,7 @@ public class CompileKotlinOptions {
} }
/** /**
* Specified additional compiler options. * Specify additional compiler options.
* *
* @param options one or more compiler options * @param options one or more compiler options
* @return this class instance * @return this class instance
@ -473,7 +473,7 @@ public class CompileKotlinOptions {
} }
/** /**
* Specified additional compiler options. * Specify additional compiler options.
* *
* @param options list of compiler options * @param options list of compiler options
* @return this class instance * @return this class instance

View file

@ -26,6 +26,7 @@ import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.logging.ConsoleHandler; import java.util.logging.ConsoleHandler;
import java.util.logging.Level; import java.util.logging.Level;
@ -80,6 +81,12 @@ class CompileKotlinOperationTest {
.compileTestClasspath(mainDir.getAbsolutePath()); .compileTestClasspath(mainDir.getAbsolutePath());
op.compileOptions().verbose(true); op.compileOptions().verbose(true);
op.compileOptions().jdkRelease("17");
var args = op.compileOptions().args();
var matches = List.of("-Xjdk-release=17", "-no-stdlib", "-verbose");
assertThat(args).isEqualTo(matches);
op.execute(); op.execute();
assertThat(tmpDir).isNotEmptyDirectory(); assertThat(tmpDir).isNotEmptyDirectory();

View file

@ -93,7 +93,6 @@ class CompileKotlinOptionsTest {
"-module-name", "module", "-module-name", "module",
"-no-jdk", "-no-jdk",
"-no-reflect", "-no-reflect",
"-no-stdlib",
"-no-warn", "-no-warn",
"-opt-in", "opt1", "-opt-in", "opt1",
"-opt-in", "opt2", "-opt-in", "opt2",