test/langtools/tools/javac/modules/InheritRuntimeEnvironmentTest.java
changeset 55689 8c5c9d86e1d6
parent 47216 71c04702a3d5
child 57540 dd6d424909dc
equal deleted inserted replaced
55688:0e1bc587472c 55689:8c5c9d86e1d6
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   128         Files.createDirectories(emptyClassPath);
   128         Files.createDirectories(emptyClassPath);
   129 
   129 
   130         // This is the test, to verify that the module being compiled will not be able to read
   130         // This is the test, to verify that the module being compiled will not be able to read
   131         // modules on the module path when a --limit-modules is used
   131         // modules on the module path when a --limit-modules is used
   132         new TestCase(base)
   132         new TestCase(base)
   133                 .testOpts("--module-path", modules.toString(), "--limit-modules", "jdk.compiler")
   133                 .testOpts("--module-path", modules.toString(),
       
   134                         "--limit-modules", "jdk.compiler,jdk.internal.vm.compiler")
   134                 .otherOpts("-XDrawDiagnostics",
   135                 .otherOpts("-XDrawDiagnostics",
   135                         "--module-source-path", src.toString(),
   136                         "--module-source-path", src.toString(),
   136                         "-classpath", emptyClassPath.toString())
   137                         "-classpath", emptyClassPath.toString())
   137                 .files(findJavaFiles(src))
   138                 .files(findJavaFiles(src))
   138                 .expect(Task.Expect.FAIL, "compiler.err.module.not.found")
   139                 .expect(Task.Expect.FAIL, "compiler.err.module.not.found")