equal
deleted
inserted
replaced
47 ServiceProvidedButNotExportedOrUsedTest t = new ServiceProvidedButNotExportedOrUsedTest(); |
47 ServiceProvidedButNotExportedOrUsedTest t = new ServiceProvidedButNotExportedOrUsedTest(); |
48 t.runTests(); |
48 t.runTests(); |
49 } |
49 } |
50 |
50 |
51 @Test |
51 @Test |
52 void testWarning(Path base) throws Exception { |
52 public void testWarning(Path base) throws Exception { |
53 Path src = base.resolve("src"); |
53 Path src = base.resolve("src"); |
54 tb.writeJavaFiles(src, |
54 tb.writeJavaFiles(src, |
55 "module m { provides p1.C1 with p2.C2; }", |
55 "module m { provides p1.C1 with p2.C2; }", |
56 "package p1; public class C1 { }", |
56 "package p1; public class C1 { }", |
57 "package p2; public class C2 extends p1.C1 { }"); |
57 "package p2; public class C2 extends p1.C1 { }"); |
74 throw new Exception("Expected output not found"); |
74 throw new Exception("Expected output not found"); |
75 } |
75 } |
76 } |
76 } |
77 |
77 |
78 @Test |
78 @Test |
79 void testImplementationMustBeInSameModuleAsProvidesDirective(Path base) throws Exception { |
79 public void testImplementationMustBeInSameModuleAsProvidesDirective(Path base) throws Exception { |
80 Path src = base.resolve("src"); |
80 Path src = base.resolve("src"); |
81 tb.writeJavaFiles(src.resolve("m1"), |
81 tb.writeJavaFiles(src.resolve("m1"), |
82 "module m1 { exports p1; }", |
82 "module m1 { exports p1; }", |
83 "package p1; public class C1 { }"); |
83 "package p1; public class C1 { }"); |
84 tb.writeJavaFiles(src.resolve("m2"), |
84 tb.writeJavaFiles(src.resolve("m2"), |