a (failing) test for dependent classes recompilation

This commit is contained in:
peter
2010-07-23 11:09:01 +01:00
parent 9f839c2d79
commit cba2326c41
@@ -17,6 +17,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
@@ -58,4 +59,60 @@ class Foo implements SomeTrait {
assertEmpty(make());
}
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.gpp", """
public class B {
public static void main() {
new A().foo();
}
}
""")
assertEmpty make()
assertOutput "b", "239"
VfsUtil.saveText a.virtualFile, """
class A {
def foo() {
print "239"
}
}
"""
assertEmpty make()
assertOutput "b", "239"
}
}