|
1 | 1 | package dev.jbang.source;
|
2 | 2 |
|
3 | 3 | import static org.hamcrest.MatcherAssert.assertThat;
|
4 |
| -import static org.hamcrest.Matchers.*; |
| 4 | +import static org.hamcrest.Matchers.aMapWithSize; |
| 5 | +import static org.hamcrest.Matchers.anEmptyMap; |
| 6 | +import static org.hamcrest.Matchers.contains; |
| 7 | +import static org.hamcrest.Matchers.containsInAnyOrder; |
| 8 | +import static org.hamcrest.Matchers.equalTo; |
| 9 | +import static org.hamcrest.Matchers.hasEntry; |
| 10 | +import static org.hamcrest.Matchers.is; |
| 11 | +import static org.hamcrest.Matchers.iterableWithSize; |
| 12 | +import static org.hamcrest.Matchers.nullValue; |
5 | 13 | import static org.junit.jupiter.api.Assertions.assertThrows;
|
6 | 14 |
|
7 | 15 | import java.io.IOException;
|
@@ -121,8 +129,9 @@ void testSourceTags() {
|
121 | 129 | assertThat(prj.getJavaVersion(), equalTo("11+"));
|
122 | 130 | assertThat(prj.getMainClass(), equalTo("mainclass"));
|
123 | 131 | assertThat(prj.getModuleName().get(), equalTo("mymodule"));
|
124 |
| - assertThat(prj.getMainSourceSet().getCompileOptions(), iterableWithSize(3)); |
125 |
| - assertThat(prj.getMainSourceSet().getCompileOptions(), contains("-g", "--enable-preview", "--verbose")); |
| 132 | + assertThat(prj.getMainSourceSet().getCompileOptions(), iterableWithSize(4)); |
| 133 | + assertThat(prj.getMainSourceSet().getCompileOptions(), |
| 134 | + contains("-g", "-parameters", "--enable-preview", "--verbose")); |
126 | 135 | assertThat(prj.isNativeImage(), is(Boolean.FALSE));
|
127 | 136 | assertThat(prj.getMainSourceSet().getNativeOptions(), iterableWithSize(2));
|
128 | 137 | assertThat(prj.getMainSourceSet().getNativeOptions(), contains("-O1", "-d"));
|
@@ -229,9 +238,9 @@ void testAliasSource() throws IOException {
|
229 | 238 | assertThat(prj.getJavaVersion(), equalTo("twojava"));
|
230 | 239 | assertThat(prj.getMainClass(), equalTo("mainclass")); // This is not updated from Alias here!
|
231 | 240 | assertThat(prj.getModuleName().get(), equalTo("mymodule")); // This is not updated from Alias here!
|
232 |
| - assertThat(prj.getMainSourceSet().getCompileOptions(), iterableWithSize(4)); |
| 241 | + assertThat(prj.getMainSourceSet().getCompileOptions(), iterableWithSize(5)); |
233 | 242 | assertThat(prj.getMainSourceSet().getCompileOptions(),
|
234 |
| - contains("-g", "--enable-preview", "--verbose", "--ctwo")); |
| 243 | + contains("-g", "-parameters", "--enable-preview", "--verbose", "--ctwo")); |
235 | 244 | assertThat(prj.isNativeImage(), is(Boolean.TRUE));
|
236 | 245 | assertThat(prj.getMainSourceSet().getNativeOptions(), iterableWithSize(4));
|
237 | 246 | assertThat(prj.getMainSourceSet().getNativeOptions(), contains("-O1", "-d", "-O1", "--ntwo"));
|
|
0 commit comments