test/langtools/tools/javac/modules/ModulesAndClassPathTest.java
changeset 49579 fce4252d5227
parent 47216 71c04702a3d5
equal deleted inserted replaced
49578:0c3e252cea44 49579:fce4252d5227
    75                                 .files(findJavaFiles(moduleSrc))
    75                                 .files(findJavaFiles(moduleSrc))
    76                                 .run(Task.Expect.FAIL)
    76                                 .run(Task.Expect.FAIL)
    77                                 .writeAll()
    77                                 .writeAll()
    78                                 .getOutputLines(Task.OutputKind.DIRECT);
    78                                 .getOutputLines(Task.OutputKind.DIRECT);
    79 
    79 
    80         List<String> expected = Arrays.asList("Impl.java:1:38: compiler.err.doesnt.exist: api",
    80         List<String> expected = Arrays.asList("Impl.java:1:35: compiler.err.package.not.visible: api, (compiler.misc.not.def.access.does.not.read.unnamed: api, m)",
    81                                               "1 error");
    81                                               "1 error");
    82 
    82 
    83         if (!expected.equals(modLog)) {
    83         if (!expected.equals(modLog)) {
    84             throw new Exception("unexpected output: " + modLog);
    84             throw new Exception("unexpected output: " + modLog);
    85         }
    85         }
   127                                 .files(m1.resolve("impl").resolve("Impl.java"))
   127                                 .files(m1.resolve("impl").resolve("Impl.java"))
   128                                 .run(Task.Expect.FAIL)
   128                                 .run(Task.Expect.FAIL)
   129                                 .writeAll()
   129                                 .writeAll()
   130                                 .getOutputLines(Task.OutputKind.DIRECT);
   130                                 .getOutputLines(Task.OutputKind.DIRECT);
   131 
   131 
   132         List<String> expected = Arrays.asList("Impl.java:1:38: compiler.err.doesnt.exist: api",
   132         List<String> expected = Arrays.asList("Impl.java:1:35: compiler.err.package.not.visible: api, (compiler.misc.not.def.access.does.not.read.unnamed: api, m)",
   133                                               "1 error");
   133                                               "1 error");
   134 
   134 
   135         if (!expected.equals(modLog)) {
   135         if (!expected.equals(modLog)) {
   136             throw new Exception("unexpected output: " + modLog);
   136             throw new Exception("unexpected output: " + modLog);
   137         }
   137         }
   168                                 .files(m1.resolve("impl").resolve("Impl.java"))
   168                                 .files(m1.resolve("impl").resolve("Impl.java"))
   169                                 .run(Task.Expect.FAIL)
   169                                 .run(Task.Expect.FAIL)
   170                                 .writeAll()
   170                                 .writeAll()
   171                                 .getOutputLines(Task.OutputKind.DIRECT);
   171                                 .getOutputLines(Task.OutputKind.DIRECT);
   172 
   172 
   173         List<String> expected = Arrays.asList("Impl.java:1:38: compiler.err.doesnt.exist: api",
   173         List<String> expected = Arrays.asList("Impl.java:1:35: compiler.err.package.not.visible: api, (compiler.misc.not.def.access.does.not.read.unnamed: api, m)",
   174                                               "1 error");
   174                                               "1 error");
   175 
   175 
   176         if (!expected.equals(modLog)) {
   176         if (!expected.equals(modLog)) {
   177             throw new Exception("unexpected output: " + modLog);
   177             throw new Exception("unexpected output: " + modLog);
   178         }
   178         }