simple case (no closures) of class level objects #KT-2398 fixed
This commit is contained in:
@@ -25,23 +25,23 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.jet.CompileCompilerDependenciesTest;
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.TestJdkKind;
|
||||
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
|
||||
import org.jetbrains.jet.cli.jvm.JVMConfigurationKeys;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
|
||||
import org.jetbrains.jet.codegen.state.GenerationState;
|
||||
import org.jetbrains.jet.codegen.state.GenerationStrategy;
|
||||
import org.jetbrains.jet.lang.BuiltinsScopeExtensionMode;
|
||||
import org.jetbrains.jet.lang.resolve.ScriptNameUtil;
|
||||
import org.jetbrains.jet.utils.ExceptionUtils;
|
||||
import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
|
||||
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzingUtils;
|
||||
import org.jetbrains.jet.lang.resolve.ScriptNameUtil;
|
||||
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM;
|
||||
import org.jetbrains.jet.parsing.JetParsingTest;
|
||||
import org.jetbrains.asm4.Type;
|
||||
import org.jetbrains.jet.utils.ExceptionUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -152,8 +152,12 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
||||
}
|
||||
|
||||
protected void blackBoxFile(String filename) {
|
||||
blackBoxFile(filename, "OK");
|
||||
}
|
||||
|
||||
protected void blackBoxFile(String filename, String expected) {
|
||||
loadFile(filename);
|
||||
blackBox();
|
||||
blackBox(expected);
|
||||
}
|
||||
|
||||
protected void blackBoxFileByFullPath(String filename) {
|
||||
@@ -206,6 +210,10 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
||||
}
|
||||
|
||||
protected void blackBox() {
|
||||
blackBox("OK");
|
||||
}
|
||||
|
||||
protected void blackBox(String expected) {
|
||||
GenerationState state = generateClassesInFileGetState();
|
||||
|
||||
GeneratedClassLoader loader = createClassLoader(state.getFactory());
|
||||
@@ -248,7 +256,7 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
||||
try {
|
||||
Method method = namespaceClass.getMethod("box");
|
||||
r = (String) method.invoke(null);
|
||||
assertEquals("OK", r);
|
||||
assertEquals(expected, r);
|
||||
}
|
||||
catch (NoSuchMethodException e) {
|
||||
Method method = namespaceClass.getMethod("main",String[].class);
|
||||
|
||||
Reference in New Issue
Block a user