langtools/test/tools/javac/modules/OutputDirTest.java
changeset 40308 274367a99f98
parent 37758 3ecf9b414e05
child 42822 a84956e7ee4d
equal deleted inserted replaced
40306:1a0fcaf3f2ed 40308:274367a99f98
    61 
    61 
    62     @Test
    62     @Test
    63     public void testError(Path base) throws Exception {
    63     public void testError(Path base) throws Exception {
    64         String log = new JavacTask(tb)
    64         String log = new JavacTask(tb)
    65                 .options("-XDrawDiagnostics",
    65                 .options("-XDrawDiagnostics",
    66                         "-modulesourcepath", src.toString())
    66                         "--module-source-path", src.toString())
    67                 .files(findJavaFiles(src))
    67                 .files(findJavaFiles(src))
    68                 .run(Task.Expect.FAIL)
    68                 .run(Task.Expect.FAIL)
    69                 .writeAll()
    69                 .writeAll()
    70                 .getOutput(Task.OutputKind.DIRECT);
    70                 .getOutput(Task.OutputKind.DIRECT);
    71 
    71 
    76     @Test
    76     @Test
    77     public void testProcOnly(Path base) throws IOException {
    77     public void testProcOnly(Path base) throws IOException {
    78         new JavacTask(tb)
    78         new JavacTask(tb)
    79                 .options("-XDrawDiagnostics",
    79                 .options("-XDrawDiagnostics",
    80                         "-proc:only",
    80                         "-proc:only",
    81                         "-modulesourcepath", src.toString())
    81                         "--module-source-path", src.toString())
    82                 .files(findJavaFiles(src))
    82                 .files(findJavaFiles(src))
    83                 .run(Task.Expect.SUCCESS)
    83                 .run(Task.Expect.SUCCESS)
    84                 .writeAll();
    84                 .writeAll();
    85     }
    85     }
    86 
    86 
    88     public void testClassOutDir(Path base) throws IOException {
    88     public void testClassOutDir(Path base) throws IOException {
    89         Path classes = base.resolve("classes");
    89         Path classes = base.resolve("classes");
    90         new JavacTask(tb)
    90         new JavacTask(tb)
    91                 .options("-XDrawDiagnostics",
    91                 .options("-XDrawDiagnostics",
    92                         "-d", classes.toString(),
    92                         "-d", classes.toString(),
    93                         "-modulesourcepath", src.toString())
    93                         "--module-source-path", src.toString())
    94                 .files(findJavaFiles(src))
    94                 .files(findJavaFiles(src))
    95                 .run(Task.Expect.SUCCESS)
    95                 .run(Task.Expect.SUCCESS)
    96                 .writeAll();
    96                 .writeAll();
    97     }
    97     }
    98 
    98 
   118                 "class C { }");
   118                 "class C { }");
   119 
   119 
   120         String log = new JavacTask(tb, Task.Mode.CMDLINE)
   120         String log = new JavacTask(tb, Task.Mode.CMDLINE)
   121                 .outdir(modClasses) // an exploded module
   121                 .outdir(modClasses) // an exploded module
   122                 .options("-XDrawDiagnostics",
   122                 .options("-XDrawDiagnostics",
   123                         "-modulesourcepath", src.toString())
   123                         "--module-source-path", src.toString())
   124                 .files(findJavaFiles(src))
   124                 .files(findJavaFiles(src))
   125                 .run(Task.Expect.FAIL)
   125                 .run(Task.Expect.FAIL)
   126                 .writeAll()
   126                 .writeAll()
   127                 .getOutput(Task.OutputKind.DIRECT);
   127                 .getOutput(Task.OutputKind.DIRECT);
   128 
   128 
   155 
   155 
   156         String log = new JavacTask(tb, Task.Mode.CMDLINE)
   156         String log = new JavacTask(tb, Task.Mode.CMDLINE)
   157                 .outdir(classes) // within an exploded module
   157                 .outdir(classes) // within an exploded module
   158                 .options("-XDrawDiagnostics",
   158                 .options("-XDrawDiagnostics",
   159                         "-Xlint", "-Werror",
   159                         "-Xlint", "-Werror",
   160                         "-modulepath", modClasses.toString())
   160                         "--module-path", modClasses.toString())
   161                 .files(findJavaFiles(src))
   161                 .files(findJavaFiles(src))
   162                 .run(Task.Expect.FAIL)
   162                 .run(Task.Expect.FAIL)
   163                 .writeAll()
   163                 .writeAll()
   164                 .getOutput(Task.OutputKind.DIRECT);
   164                 .getOutput(Task.OutputKind.DIRECT);
   165 
   165