JS backend: use constants for default test package(foo) and default test function(box).

This commit is contained in:
Zalim Bashorov
2014-02-05 17:48:27 +04:00
parent 33360c2528
commit f5b1b4252d
4 changed files with 10 additions and 10 deletions
@@ -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);
}
}
@@ -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 {
@@ -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 {
@@ -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);
}
}