Minor in JS backend tests: use checkFooBoxIsOk instead of fooBoxIsValue

This commit is contained in:
Zalim Bashorov
2015-06-03 17:40:47 +03:00
parent 92457543bc
commit 9d32f5e8ed
16 changed files with 32 additions and 34 deletions
@@ -50,7 +50,7 @@ public abstract class SingleFileTranslationTest extends BasicTest {
runFunctionOutputTestByPath(ecmaVersions, getInputFilePath(kotlinFilename), packageName, functionName, expectedResult);
}
protected void runFunctionOutputTestByPath(
private void runFunctionOutputTestByPath(
@NotNull Iterable<EcmaVersion> ecmaVersions,
@NotNull String kotlinFilePath,
@NotNull String packageName,
@@ -73,14 +73,6 @@ public abstract class SingleFileTranslationTest extends BasicTest {
checkFooBoxIsTrue(getTestName(true) + ".kt", DEFAULT_ECMA_VERSIONS);
}
protected void fooBoxIsValue(Object expected) throws Exception {
runFunctionOutputTest(DEFAULT_ECMA_VERSIONS, getTestName(true) + ".kt", TEST_PACKAGE, TEST_FUNCTION, expected);
}
protected void fooBoxTest(@NotNull Iterable<EcmaVersion> ecmaVersions) throws Exception {
checkFooBoxIsTrue(getTestName(true) + ".kt", ecmaVersions);
}
protected void checkFooBoxIsOk() throws Exception {
checkFooBoxIsOk(getTestName(true) + ".kt");
}
@@ -23,6 +23,6 @@ public final class DollarParameterTest extends AbstractExpressionTest {
}
public void testDollarParameter() throws Exception {
fooBoxIsValue("Hello world!");
checkFooBoxIsOk();
}
}
@@ -23,7 +23,7 @@ public final class InvokeConventionTest extends AbstractExpressionTest {
}
public void testInvokeMethod() throws Exception {
fooBoxIsValue("hello world!");
checkFooBoxIsOk();
}
public void testExplicitInvokeLambda() throws Exception {
@@ -149,7 +149,7 @@ public final class MiscTest extends AbstractExpressionTest {
}
public void testPackageLevelVarInPackage() throws Exception {
fooBoxIsValue("OK");
checkFooBoxIsOk();
}
public void testPackageLevelVarInRoot() throws Exception {
@@ -161,7 +161,7 @@ public final class MiscTest extends AbstractExpressionTest {
}
public void testLocalVarAsFunction() throws Exception {
fooBoxIsValue("OK");
checkFooBoxIsOk();
}
public void testExclExclThrows() throws Exception {
@@ -42,7 +42,7 @@ public final class NumberTest extends SingleFileTranslationTest {
}
public void testDivision() throws Exception {
fooBoxIsValue("SUCCESS");
checkFooBoxIsOk();
}
// KT-2342 Type mismatch on Int division (JavaScript back-end)
@@ -43,7 +43,7 @@ public final class PropertyAccessTest extends SingleFileTranslationTest {
}
public void testSetter() throws Exception {
fooBoxIsValue(99.0);
checkFooBoxIsOk();
}
@@ -23,7 +23,7 @@ public final class StringTemplatesTest extends AbstractExpressionTest {
}
public void testObjectWithToString() throws Exception {
fooBoxIsValue("a = abcS, b = defS");
checkFooBoxIsOk();
}
public void testStringValues() throws Exception {
@@ -59,7 +59,7 @@ public final class StringTest extends AbstractExpressionTest {
}
public void testNumbersInTemplate() throws Exception {
fooBoxIsValue("2354");
checkFooBoxIsOk();
}
public void testStringSplit() throws Exception {
@@ -53,7 +53,7 @@ public final class WhenTest extends AbstractExpressionTest {
}
public void testMultipleCases() throws Exception {
fooBoxIsValue(2.0);
checkFooBoxIsOk();
}
public void testMatchNullableType() throws Exception {