-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eclipse 4.16 (M2) JDT Patch for Groovy-Eclipse: JDT commit 57460b9
- Loading branch information
1 parent
9723670
commit d5e654f
Showing
77 changed files
with
2,443 additions
and
1,032 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
....eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/Bug562420Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 Stephan Herrmann and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Stephan Herrmann - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.jdt.core.tests.builder; | ||
|
||
import org.eclipse.core.runtime.IPath; | ||
import org.eclipse.jdt.core.JavaCore; | ||
import org.eclipse.jdt.core.JavaModelException; | ||
import org.eclipse.jdt.core.tests.util.Util; | ||
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; | ||
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; | ||
|
||
import junit.framework.Test; | ||
|
||
public class Bug562420Test extends BuilderTests { | ||
public Bug562420Test(String name) { | ||
super(name); | ||
} | ||
|
||
public static Test suite() { | ||
return buildTestSuite(Bug562420Test.class); | ||
} | ||
public void testBuilderRegression() throws JavaModelException, Exception { | ||
IPath projectPath = env.addProject("Bug562420Test", "9"); | ||
env.removePackageFragmentRoot(projectPath, ""); | ||
IPath src = env.addPackageFragmentRoot(projectPath, "src"); | ||
|
||
env.addExternalJars(projectPath, Util.getJavaClassLibs()); | ||
IPath testAppPath = env.addClass(src, "org.easylibs.test", "TestApp", | ||
"package org.easylibs.test;\n" + | ||
"public class TestApp {\n" + | ||
" public static void main(String[] args) {\n" + | ||
" System.out.println(\"Hello World\");\n" + | ||
" }\n" + | ||
"}\n"); | ||
env.addFile(testAppPath.removeLastSegments(1), "package-info.java", | ||
"package org.easylibs.test;"); | ||
env.addFile(src, "module-info.java", | ||
"module test {\n" + | ||
" requires java.base;\n" + | ||
" exports org.easylibs.test;\n" + | ||
"}\n"); | ||
fullBuild(); | ||
if (CompilerOptions.versionToJdkLevel(System.getProperty("java.specification.version")) < ClassFileConstants.JDK9) { | ||
expectingProblemsFor(projectPath, | ||
"Problem : java.base cannot be resolved to a module [ resource : </Bug562420Test/src/module-info.java> range : <24,33> category : <160> severity : <2>]"); | ||
} else { | ||
expectingNoProblems(); | ||
} | ||
|
||
env.getJavaProject(projectPath).setOption(JavaCore.COMPILER_SOURCE, "1.8"); | ||
env.getJavaProject(projectPath).setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, "1.8"); | ||
fullBuild(); | ||
expectingProblemsFor(projectPath, | ||
"Problem : Syntax error on token \".\", , expected [ resource : </Bug562420Test/src/module-info.java> range : <28,29> category : <20> severity : <2>]\n" + | ||
"Problem : Syntax error on token \".\", = expected [ resource : </Bug562420Test/src/module-info.java> range : <47,48> category : <20> severity : <2>]\n" + | ||
"Problem : Syntax error on token \"module\", interface expected [ resource : </Bug562420Test/src/module-info.java> range : <0,6> category : <20> severity : <2>]"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.