mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8152062: obscure error message for bad 'provides'
Reviewed-by: jjg
This commit is contained in:
parent
dee728f027
commit
8d93dc2a15
5 changed files with 109 additions and 5 deletions
|
@ -143,8 +143,7 @@ public class ProvidesTest extends ModuleTestBase {
|
|||
List<String> expected = Arrays.asList(
|
||||
"C.java:1:36: compiler.err.cant.resolve.location: kindname.class, Missing, , , (compiler.misc.location: kindname.package, p, null)",
|
||||
"module-info.java:1:22: compiler.err.cant.resolve.location: kindname.class, Missing, , , (compiler.misc.location: kindname.package, p, null)",
|
||||
"module-info.java:1:37: compiler.err.service.implementation.doesnt.have.a.no.args.constructor: <any>",
|
||||
"3 errors");
|
||||
"2 errors");
|
||||
if (!output.containsAll(expected)) {
|
||||
throw new Exception("Expected output not found");
|
||||
}
|
||||
|
@ -192,8 +191,11 @@ public class ProvidesTest extends ModuleTestBase {
|
|||
.writeAll()
|
||||
.getOutputLines(Task.OutputKind.DIRECT);
|
||||
|
||||
List<String> expected = Arrays.asList("module-info.java:1:31: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: p.B, p.A)",
|
||||
"1 error");
|
||||
List<String> expected = Arrays.asList(
|
||||
"module-info.java:1:31: compiler.err.service.implementation.must.be.subtype.of.service.interface",
|
||||
"module-info.java:1:12: compiler.warn.service.provided.but.not.exported.or.used: p.A",
|
||||
"1 error",
|
||||
"1 warning");
|
||||
if (!output.containsAll(expected)) {
|
||||
throw new Exception("Expected output not found");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue