mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
a (failing) test for dependent classes recompilation
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user