From f5b1b4252df6bec008f1f3d83a864d529fe64d92 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Wed, 5 Feb 2014 17:48:27 +0400 Subject: [PATCH] JS backend: use constants for default test package(`foo`) and default test function(`box`). --- .../k2js/test/MultipleFilesTranslationTest.java | 2 +- .../jetbrains/k2js/test/semantics/InitializerTest.java | 2 +- .../org/jetbrains/k2js/test/semantics/MiscTest.java | 6 +++--- .../k2js/test/semantics/MultiPackageTest.java | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/js/js.tests/test/org/jetbrains/k2js/test/MultipleFilesTranslationTest.java b/js/js.tests/test/org/jetbrains/k2js/test/MultipleFilesTranslationTest.java index dabe134af36..714a06ca16c 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/MultipleFilesTranslationTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/MultipleFilesTranslationTest.java @@ -53,7 +53,7 @@ public abstract class MultipleFilesTranslationTest extends BasicTest { } public void checkFooBoxIsTrue(@NotNull String dirName) throws Exception { - runMultiFileTest(dirName, "foo", "box", true); + runMultiFileTest(dirName, TEST_PACKAGE, TEST_FUNCTION, true); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/InitializerTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/InitializerTest.java index bffd5ef1020..22ac8006c84 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/InitializerTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/InitializerTest.java @@ -28,7 +28,7 @@ public class InitializerTest extends SingleFileTranslationTest { } public void testRootPackageValInit() throws Exception { - runFunctionOutputTest(DEFAULT_ECMA_VERSIONS, getTestName(true) + ".kt", "_", "box", "OK"); + runFunctionOutputTest(DEFAULT_ECMA_VERSIONS, getTestName(true) + ".kt", "_", TEST_FUNCTION, "OK"); } public void testClassInitializer() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java index 42960324180..4d8f1978704 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java @@ -28,8 +28,8 @@ public final class MiscTest extends AbstractExpressionTest { super("misc/"); } - public void testLocalPropertys() throws Exception { - runFunctionOutputTest("localProperty.kt", "foo", "box", 50); + public void testLocalProperty() throws Exception { + fooBoxIsValue(50); } public void testIntRange() throws Exception { @@ -42,7 +42,7 @@ public final class MiscTest extends AbstractExpressionTest { } public void testClassWithoutPackage() throws Exception { - runFunctionOutputTest("classWithoutPackage.kt", Namer.getRootPackageName(), "box", true); + runFunctionOutputTest("classWithoutPackage.kt", Namer.getRootPackageName(), TEST_FUNCTION, true); } public void testIfElseAsExpressionWithThrow() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java index df5530a5296..563b26b8c1f 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java @@ -39,23 +39,23 @@ public class MultiPackageTest extends MultipleFilesTranslationTest { } public void testNestedPackageFunctionCalledFromOtherPackage() throws Exception { - runMultiFileTest("nestedPackageFunctionCalledFromOtherPackage", "a.foo", "box", true); + runMultiFileTest("nestedPackageFunctionCalledFromOtherPackage", "a.foo", TEST_FUNCTION, true); } public void testSubpackagesWithClashingNames() throws Exception { - runMultiFileTest("subpackagesWithClashingNames", "a.foo", "box", true); + runMultiFileTest("subpackagesWithClashingNames", "a.foo", TEST_FUNCTION, true); } public void testSubpackagesWithClashingNamesUsingImport() throws Exception { - runMultiFileTest("subpackagesWithClashingNamesUsingImport", "a.foo", "box", true); + runMultiFileTest("subpackagesWithClashingNamesUsingImport", "a.foo", TEST_FUNCTION, true); } public void testCreateClassFromOtherPackage() throws Exception { - runMultiFileTest("createClassFromOtherPackage", "a.foo", "box", true); + runMultiFileTest("createClassFromOtherPackage", "a.foo", TEST_FUNCTION, true); } public void testCreateClassFromOtherPackageUsingImport() throws Exception { - runMultiFileTest("createClassFromOtherPackageUsingImport", "a.foo", "box", true); + runMultiFileTest("createClassFromOtherPackageUsingImport", "a.foo", TEST_FUNCTION, true); } }