提交 855142e3 编写于 作者: S Stepan Koltsov

move test output to one level down

for ReadClassDataTest and CompileJavaAgainstKotlinTest
上级 02b2cc4f
......@@ -53,7 +53,7 @@ public class CompileJavaAgainstKotlinTest extends UsefulTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
tmpdir = new File("tmp/" + this.getClass().getSimpleName() + "." + this.getName());
tmpdir = JetTestUtils.tmpDirForTest(this);
JetTestUtils.recreateDirectory(tmpdir);
}
......
......@@ -2,6 +2,7 @@ package org.jetbrains.jet;
import com.google.common.collect.Lists;
import com.intellij.openapi.Disposable;
import junit.framework.TestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
......@@ -166,6 +167,10 @@ public class JetTestUtils {
file.delete();
}
}
public static File tmpDirForTest(TestCase test) {
return new File("tmp/" + test.getClass().getSimpleName() + "/" + test.getName());
}
public static void recreateDirectory(File file) throws IOException {
rmrf(file);
......
......@@ -62,7 +62,7 @@ public class ReadClassDataTest extends UsefulTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
tmpdir = new File("tmp/" + this.getClass().getSimpleName() + "." + this.getName());
tmpdir = JetTestUtils.tmpDirForTest(this);
JetTestUtils.recreateDirectory(tmpdir);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册