From 35ea508f4c07f863e7a172f07bbbba3f8a8eace3 Mon Sep 17 00:00:00 2001 From: pTalanov Date: Wed, 29 Feb 2012 17:31:59 +0400 Subject: [PATCH] Fix tests to work in a clean environment. Share javascript backend tests. --- .idea/runConfigurations/Js_backend_tests.xml | 33 +++++++++++++++++++ .../jetbrains/k2js/test/TranslationTest.java | 7 ++-- 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .idea/runConfigurations/Js_backend_tests.xml diff --git a/.idea/runConfigurations/Js_backend_tests.xml b/.idea/runConfigurations/Js_backend_tests.xml new file mode 100644 index 00000000000..011469a460a --- /dev/null +++ b/.idea/runConfigurations/Js_backend_tests.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java b/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java index 07d7e13e7a1..dcb12157e3d 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/TranslationTest.java @@ -42,7 +42,7 @@ import static org.jetbrains.k2js.utils.JetFileUtils.createPsiFileList; */ public abstract class TranslationTest extends BaseTest { - private static final boolean DELETE_OUT = true; + private static final boolean DELETE_OUT = false; public static final String TEST_FILES = "js.translator/testFiles/"; private static final String CASES = "cases/"; private static final String OUT = "out/"; @@ -65,8 +65,7 @@ public abstract class TranslationTest extends BaseTest { @Override protected void setUp() throws Exception { super.setUp(); - //noinspection PointlessBooleanExpression - if (!shouldCreateOut() || !DELETE_OUT) { + if (!shouldCreateOut()) { return; } File outDir = new File(getOutputPath()); @@ -80,7 +79,7 @@ public abstract class TranslationTest extends BaseTest { @Override protected void tearDown() throws Exception { super.tearDown(); - if (!shouldCreateOut()) { + if (!shouldCreateOut() || !DELETE_OUT) { return; } File outDir = new File(getOutputPath());