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

View file

@ -462,7 +462,7 @@ public class CompileKotlinOptions {
}
/**
* Specified additional compiler options.
* Specify additional compiler options.
*
* @param options one or more compiler options
* @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
* @return this class instance

View file

@ -26,6 +26,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
@ -80,6 +81,12 @@ class CompileKotlinOperationTest {
.compileTestClasspath(mainDir.getAbsolutePath());
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();
assertThat(tmpDir).isNotEmptyDirectory();

View file

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