Clean up test data after end of the test
This commit is contained in:
@@ -62,9 +62,19 @@ public class CheckLocalVariablesTableTest extends TestCaseWithTmpdir {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runTest() throws Throwable {
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
jetCoreEnvironment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
jetCoreEnvironment = null;
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runTest() throws Throwable {
|
||||
String text = FileUtil.loadFile(ktFile);
|
||||
|
||||
JetFile psiFile = JetTestUtils.createFile(ktFile.getName(), text, jetCoreEnvironment.getProject());
|
||||
|
||||
@@ -50,6 +50,12 @@ public abstract class AbstractWriteFlagsTest extends UsefulTestCase {
|
||||
jetCoreEnvironment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
jetCoreEnvironment = null;
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
protected void doTest(String path) throws IOException {
|
||||
File ktFile = new File(path);
|
||||
assertTrue("Cannot find a file " + ktFile.getAbsolutePath(), ktFile.exists());
|
||||
|
||||
Reference in New Issue
Block a user