From 69cc1efd960485934e2ff9c8e86f89d625e51c90 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 28 Feb 2014 13:29:16 +0100 Subject: [PATCH] remove GppCompilerTest --- .../plugins/groovy/FastGroovyTestSuite.java | 4 +- .../groovy/compiler/GppCompilerTest.groovy | 136 ------------------ 2 files changed, 1 insertion(+), 139 deletions(-) delete mode 100644 plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GppCompilerTest.groovy diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/FastGroovyTestSuite.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/FastGroovyTestSuite.java index 11597e915fe4..42404baeec57 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/FastGroovyTestSuite.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/FastGroovyTestSuite.java @@ -19,7 +19,6 @@ import com.intellij.TestAll; import com.intellij.TestCaseLoader; import junit.framework.Test; import junit.framework.TestSuite; -import org.jetbrains.plugins.groovy.compiler.GppCompilerTest; import org.jetbrains.plugins.groovy.compiler.GroovyCompilerTest; import org.jetbrains.plugins.groovy.compiler.GroovyDebuggerTest; import org.jetbrains.plugins.groovy.lang.GroovyStressPerformanceTest; @@ -46,8 +45,7 @@ public class FastGroovyTestSuite { private static boolean isSlow(Class aClass) { return aClass.equals(GroovyDebuggerTest.class) || aClass.equals(GroovyStressPerformanceTest.class) || - aClass.getName().startsWith(GroovyCompilerTest.class.getName()) || - aClass.getName().startsWith(GppCompilerTest.class.getName()); + aClass.getName().startsWith(GroovyCompilerTest.class.getName()); } } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GppCompilerTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GppCompilerTest.groovy deleted file mode 100644 index 316de960091c..000000000000 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GppCompilerTest.groovy +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2000-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.plugins.groovy.compiler - -import com.intellij.compiler.CompilerConfiguration -import com.intellij.compiler.CompilerConfigurationImpl -import com.intellij.compiler.server.BuildManager -import com.intellij.openapi.util.io.FileUtil -import com.intellij.openapi.vfs.VfsUtil -import com.intellij.testFramework.PsiTestUtil -import org.jetbrains.plugins.groovy.util.TestUtils -/** - * @author peter - */ -public abstract class GppCompilerTest extends GroovyCompilerTestCase { - String[] oldPatterns - - @Override protected void setUp() { - super.setUp(); - PsiTestUtil.addLibrary myFixture.module, "gpp", TestUtils.absoluteTestDataPath + "/realGroovypp/", "groovy-all-1.8.2.jar", "groovypp-all-0.9.0_1.8.2.jar" - CompilerConfigurationImpl conf = CompilerConfiguration.getInstance(project) - oldPatterns = conf.resourceFilePatterns - conf.addResourceFilePattern("!*.gpp") - } - - @Override - protected void tearDown() { - CompilerConfigurationImpl conf = CompilerConfiguration.getInstance(project) - conf.removeResourceFilePatterns() - oldPatterns.each { conf.addResourceFilePattern(it) } - super.tearDown() - } - - public void testRecompileDependentGroovyClasses() throws Exception { - def a = myFixture.addFileToProject("A.gpp", """ -class A { - void foo() { - print "239" - } -} -""") - myFixture.addFileToProject("b.gpp", """ -new A().foo() -""") - assertEmpty make() - assertOutput "b", "239" - - VfsUtil.saveText a.virtualFile, """ -class A { - def foo() { - print "239" - } -} -""" - - assertEmpty make() - assertOutput "b", "239" - } - - public void testRecompileDependentJavaClasses() throws Exception { - def a = myFixture.addFileToProject("A.gpp", """ -class A { - void foo() { - print "239" - } -} -""") - myFixture.addFileToProject("B.java", """ -public class B { - public static void main(String[] args) { - new A().foo(); - } -} -""") - assertEmpty make() - assertOutput "B", "239" - - VfsUtil.saveText a.virtualFile, """ -class A { - def foo() { - print "239" - } -} -""" - - assertEmpty make() - assertOutput "B", "239" - } - - public static class IdeaModeTest extends GppCompilerTest { - @Override - protected boolean useJps() { false } - } - - public static class JpsModeTest extends GppCompilerTest { - @Override - protected boolean useJps() { true } - - @Override - void testRecompileDependentJavaClasses() { - super.testRecompileDependentJavaClasses() - } - - @Override - void testRecompileDependentGroovyClasses() { - super.testRecompileDependentGroovyClasses() - } - - @Override - protected void tearDown() { - File systemRoot = BuildManager.getInstance().getBuildSystemDirectory() - try { - super.tearDown() - } - finally { - FileUtil.delete(systemRoot); - } - } - } - - -}