mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
groovy++, some tests using it
This commit is contained in:
Generated
+11
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Groovy++">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/community/lib/groovypp-all-0.4.170.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/community/lib/src/groovypp-0.4.170-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
Binary file not shown.
Binary file not shown.
@@ -30,6 +30,7 @@
|
||||
<orderEntry type="module" module-name="IntelliLang-java" scope="TEST" />
|
||||
<orderEntry type="module" module-name="IntelliLang-xml" scope="TEST" />
|
||||
<orderEntry type="module" module-name="jam-support-openapi" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Groovy++" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
+3
-3
@@ -18,8 +18,7 @@ package org.jetbrains.plugins.groovy.compiler;
|
||||
|
||||
|
||||
import com.intellij.openapi.vfs.VfsUtil
|
||||
import com.intellij.testFramework.PsiTestUtil
|
||||
import org.jetbrains.plugins.groovy.util.TestUtils
|
||||
import org.jetbrains.plugins.groovy.config.GroovyConfigUtils
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -27,7 +26,8 @@ import org.jetbrains.plugins.groovy.util.TestUtils
|
||||
public class GppCompilerTest extends GroovyCompilerTestCase {
|
||||
@Override protected void setUp() {
|
||||
super.setUp();
|
||||
PsiTestUtil.addLibrary myFixture.module, "gpp", TestUtils.absoluteTestDataPath + "/realGroovypp/", "groovypp-all-0.2.13.jar"
|
||||
addGroovyLibrary myModule, GroovyConfigUtils.GROOVY_ALL_JAR_PATTERN, "groovy";
|
||||
addGroovyLibrary myFixture.module, "groovypp-all-(.*)jar", "gpp"
|
||||
}
|
||||
|
||||
public void testTraitStubs() throws Throwable {
|
||||
+3
-2
@@ -22,6 +22,7 @@ import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.PsiFile
|
||||
import junit.framework.AssertionFailedError
|
||||
import org.jetbrains.plugins.groovy.config.GroovyConfigUtils
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -29,7 +30,7 @@ import junit.framework.AssertionFailedError
|
||||
public class GroovyCompilerTest extends GroovyCompilerTestCase {
|
||||
@Override protected void setUp() {
|
||||
super.setUp();
|
||||
addGroovyLibrary(myModule);
|
||||
addGroovyLibrary(myModule, GroovyConfigUtils.GROOVY_ALL_JAR_PATTERN, "groovy");
|
||||
}
|
||||
|
||||
public void testPlainGroovy() throws Throwable {
|
||||
@@ -266,7 +267,7 @@ public class GroovyCompilerTest extends GroovyCompilerTestCase {
|
||||
|
||||
Module dep = addDependentModule();
|
||||
|
||||
addGroovyLibrary(dep);
|
||||
addGroovyLibrary(dep, GroovyConfigUtils.GROOVY_ALL_JAR_PATTERN, "groovy");
|
||||
|
||||
assertEmpty(make());
|
||||
assertOutput("Bar", "239", dep);
|
||||
+3
-4
@@ -41,7 +41,6 @@ import com.intellij.testFramework.fixtures.impl.TempDirTestFixtureImpl;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.concurrency.Semaphore;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.plugins.groovy.config.GroovyConfigUtils;
|
||||
import org.jetbrains.plugins.groovy.util.GroovyUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -80,11 +79,11 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC
|
||||
super.tuneFixture(moduleBuilder);
|
||||
}
|
||||
|
||||
protected static void addGroovyLibrary(final Module to) {
|
||||
protected static void addGroovyLibrary(final Module to, String groovyJarPattern, final String libName) {
|
||||
final String root = PluginPathManager.getPluginHomePath("groovy") + "/../../lib/";
|
||||
final File[] groovyJars = GroovyUtils.getFilesInDirectoryByPattern(root, GroovyConfigUtils.GROOVY_ALL_JAR_PATTERN);
|
||||
final File[] groovyJars = GroovyUtils.getFilesInDirectoryByPattern(root, groovyJarPattern);
|
||||
assert groovyJars.length == 1;
|
||||
PsiTestUtil.addLibrary(to, "groovy", root, groovyJars[0].getName());
|
||||
PsiTestUtil.addLibrary(to, libName, root, groovyJars[0].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user