161 .writeAll(); |
161 .writeAll(); |
162 } |
162 } |
163 |
163 |
164 @Test |
164 @Test |
165 public void testMultiOnModulePath(Path base) throws Exception { |
165 public void testMultiOnModulePath(Path base) throws Exception { |
|
166 Path modSrc = base.resolve("modSrc"); |
166 Path modules = base.resolve("modules"); |
167 Path modules = base.resolve("modules"); |
167 new ModuleBuilder(tb, "m1") |
168 new ModuleBuilder(tb, "m1") |
168 .exports("p") |
169 .exports("p") |
169 .classes("package p; public class C { }") |
170 .classes("package p; public class C { }") |
170 .build(modules); |
171 .build(modules); |
171 new ModuleBuilder(tb, "m2") |
172 new ModuleBuilder(tb, "m2") |
172 .requires("m1") |
173 .requires("m1") |
173 .uses("p.C") |
174 .uses("p.C") |
174 .write(modules); |
175 .write(modSrc); |
175 |
176 |
176 new JavacTask(tb) |
177 new JavacTask(tb) |
177 .options("-mp", modules.toString()) |
178 .options("-mp", modules.toString()) |
178 .outdir(modules) |
179 .outdir(modules) |
179 .files(findJavaFiles(modules.resolve("m2"))) |
180 .files(findJavaFiles(modSrc.resolve("m2"))) |
180 .run(Task.Expect.SUCCESS) |
181 .run(Task.Expect.SUCCESS) |
181 .writeAll(); |
182 .writeAll(); |
182 } |
183 } |
183 |
184 |
184 @Test |
185 @Test |
185 public void testMultiOnModulePathInner(Path base) throws Exception { |
186 public void testMultiOnModulePathInner(Path base) throws Exception { |
|
187 Path modSrc = base.resolve("modSrc"); |
186 Path modules = base.resolve("modules"); |
188 Path modules = base.resolve("modules"); |
187 new ModuleBuilder(tb, "m1") |
189 new ModuleBuilder(tb, "m1") |
188 .exports("p") |
190 .exports("p") |
189 .classes("package p; public class C { public class Inner { } }") |
191 .classes("package p; public class C { public class Inner { } }") |
190 .build(modules); |
192 .build(modules); |
191 new ModuleBuilder(tb, "m2") |
193 new ModuleBuilder(tb, "m2") |
192 .requires("m1") |
194 .requires("m1") |
193 .uses("p.C.Inner") |
195 .uses("p.C.Inner") |
194 .write(modules); |
196 .write(modSrc); |
195 |
197 |
196 new JavacTask(tb) |
198 new JavacTask(tb) |
197 .options("-mp", modules.toString()) |
199 .options("-mp", modules.toString()) |
198 .outdir(modules) |
200 .outdir(modules) |
199 .files(findJavaFiles(modules.resolve("m2"))) |
201 .files(findJavaFiles(modSrc.resolve("m2"))) |
200 .run(Task.Expect.SUCCESS) |
202 .run(Task.Expect.SUCCESS) |
201 .writeAll(); |
203 .writeAll(); |
202 } |
204 } |
203 |
205 |
204 @Test |
206 @Test |