KT-2633 Support multiple assignment in JVM Back-end

#KT-2633 Fixed
This commit is contained in:
Svetlana Isakova
2012-08-21 16:12:30 +04:00
parent 239c5fd94b
commit 47362bf2ac
16 changed files with 355 additions and 2 deletions
@@ -20,6 +20,7 @@ import com.google.common.base.Predicates;
import com.google.common.collect.Lists;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.psi.PsiFile;
import com.intellij.testFramework.UsefulTestCase;
import org.jetbrains.annotations.NotNull;
@@ -121,6 +122,17 @@ public abstract class CodegenTestCase extends UsefulTestCase {
}
}
protected String loadFileByFullPath(final String fullPath) {
try {
File file = new File(fullPath);
final String content = FileUtil.loadFile(file, true);
myFiles = CodegenTestFiles.create(file.getName(), content, myEnvironment.getProject());
return content;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
protected void loadFiles(final String... names) {
myFiles = CodegenTestFiles.create(myEnvironment.getProject(), names);
}
@@ -138,6 +150,11 @@ public abstract class CodegenTestCase extends UsefulTestCase {
blackBox();
}
protected void blackBoxFileByFullPath(String filename) {
loadFileByFullPath(filename);
blackBox();
}
protected void blackBoxMultiFile(String... filenames) {
loadFiles(filenames);
blackBox();