diff --git a/js/js.tests/test/org/jetbrains/k2js/test/SingleFileTranslationTest.java b/js/js.tests/test/org/jetbrains/k2js/test/SingleFileTranslationTest.java index 18ecad4e5d9..599ef455565 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/SingleFileTranslationTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/SingleFileTranslationTest.java @@ -51,6 +51,10 @@ public abstract class SingleFileTranslationTest extends BasicTest { runFunctionOutputTest(filename, "foo", "box", true); } + public void fooBoxTest() throws Exception { + checkFooBoxIsTrue(getTestName(true) + ".kt"); + } + public void checkFooBoxIsOk(@NotNull String filename) throws Exception { runFunctionOutputTest(filename, "foo", "box", "OK"); } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ArrayListTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ArrayListTest.java index 00e76b95684..4a2f0b6ff1f 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ArrayListTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ArrayListTest.java @@ -28,32 +28,32 @@ public final class ArrayListTest extends JavaClassesTest { } public void testEmptyList() throws Exception { - checkFooBoxIsTrue("emptyList.kt"); + fooBoxTest(); } public void testAccess() throws Exception { - checkFooBoxIsTrue("access.kt"); + fooBoxTest(); } public void testIsEmpty() throws Exception { - checkFooBoxIsTrue("isEmpty.kt"); + fooBoxTest(); } public void testArrayAccess() throws Exception { - checkFooBoxIsTrue("arrayAccess.kt"); + fooBoxTest(); } public void testIterate() throws Exception { - checkFooBoxIsTrue("iterate.kt"); + fooBoxTest(); } public void testRemove() throws Exception { - checkFooBoxIsTrue("remove.kt"); + fooBoxTest(); } public void testIndexOOB() throws Exception { try { - checkFooBoxIsTrue("indexOOB.kt"); + fooBoxTest(); fail(); } catch (JavaScriptException e) { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClassInheritanceTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClassInheritanceTest.java index 7b4875bc0ad..604f74a59fc 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClassInheritanceTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClassInheritanceTest.java @@ -32,31 +32,31 @@ public final class ClassInheritanceTest extends SingleFileTranslationTest { } public void testMethodOverride() throws Exception { - checkFooBoxIsTrue("methodOverride.kt"); + fooBoxTest(); } public void testInitializationOrder() throws Exception { - checkFooBoxIsTrue("initializationOrder.kt"); + fooBoxTest(); } public void testComplexInitializationOrder() throws Exception { - checkFooBoxIsTrue("complexInitializationOrder.kt"); + fooBoxTest(); } public void testValuePassedToAncestorConstructor() throws Exception { - checkFooBoxIsTrue("valuePassedToAncestorConstructor.kt"); + fooBoxTest(); } public void testBaseClassDefinedAfterDerived() throws Exception { - checkFooBoxIsTrue("baseClassDefinedAfterDerived.kt"); + fooBoxTest(); } public void testDefinitionOrder() throws Exception { - checkFooBoxIsTrue("definitionOrder.kt"); + fooBoxTest(); } public void testAbstractVarOverride() throws Exception { - checkFooBoxIsTrue("abstractVarOverride.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClosureTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClosureTest.java index 0beb3836ac0..e3380fc94c4 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClosureTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ClosureTest.java @@ -28,6 +28,6 @@ public final class ClosureTest extends SingleFileTranslationTest { } public void testIteratingCallbacks() throws Exception { - checkFooBoxIsTrue("iteratingCallbacks.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/DangerousTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/DangerousTest.java index 9867eb335aa..861be8c5348 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/DangerousTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/DangerousTest.java @@ -28,30 +28,30 @@ public final class DangerousTest extends SingleFileTranslationTest { } public void testIfAsFunArgument() throws Exception { - checkFooBoxIsTrue("ifAsFunArgument.kt"); + fooBoxTest(); } public void testIfAsPlusArgument() throws Exception { - checkFooBoxIsTrue("ifAsPlusArgument.kt"); + fooBoxTest(); } public void testWhenAsMinusArgument() throws Exception { - checkFooBoxIsTrue("whenAsMinusArgument.kt"); + fooBoxTest(); } public void testEvaluationOrder() throws Exception { - checkFooBoxIsTrue("evaluationOrder.kt"); + fooBoxTest(); } public void testDangerousInsideDangerous() throws Exception { - checkFooBoxIsTrue("dangerousInsideDangerous.kt"); + fooBoxTest(); } public void test2dangerousInExpression() throws Exception { - checkFooBoxIsTrue("2dangerousInExpression.kt"); + fooBoxTest(); } public void testDangerousInline() throws Exception { - checkFooBoxIsTrue("dangerousInline.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java index 72058f94a29..4108553cf48 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java @@ -28,35 +28,35 @@ public final class ExtensionFunctionTest extends SingleFileTranslationTest { } public void testIntExtension() throws Exception { - checkFooBoxIsTrue("intExtension.kt"); + fooBoxTest(); } public void testExtensionWithImplicitReceiver() throws Exception { - checkFooBoxIsTrue("extensionWithImplicitReceiver.kt"); + fooBoxTest(); } public void testExtensionFunctionOnExpression() throws Exception { - checkFooBoxIsTrue("extensionFunctionOnExpression.kt"); + fooBoxTest(); } public void testExtensionUsedInsideClass() throws Exception { - checkFooBoxIsTrue("extensionUsedInsideClass.kt"); + fooBoxTest(); } public void testVirtualExtension() throws Exception { - checkFooBoxIsTrue("virtualExtension.kt"); + fooBoxTest(); } public void testVirtualExtensionOverride() throws Exception { - checkFooBoxIsTrue("virtualExtensionOverride.kt"); + fooBoxTest(); } public void testExtensionLiteralPassedToFunction() throws Exception { - checkFooBoxIsTrue("extensionLiteralPassedToFunction.kt"); + fooBoxTest(); } public void testExtensionInsideFunctionLiteral() throws Exception { - checkFooBoxIsTrue("extensionInsideFunctionLiteral.kt"); + fooBoxTest(); } public void testGenericExtension() throws Exception { @@ -64,6 +64,6 @@ public final class ExtensionFunctionTest extends SingleFileTranslationTest { } public void testExtensionFunctionCalledFromExtensionFunction() throws Exception { - checkFooBoxIsTrue("extensionFunctionCalledFromExtensionFunction.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionPropertyTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionPropertyTest.java index b3e1d3b1589..29588d3eea5 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionPropertyTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionPropertyTest.java @@ -28,14 +28,14 @@ public final class ExtensionPropertyTest extends SingleFileTranslationTest { } public void testSimplePropertyWithGetter() throws Exception { - checkFooBoxIsTrue("simplePropertyWithGetter.kt"); + fooBoxTest(); } public void testPropertyWithGetterAndSetter() throws Exception { - checkFooBoxIsTrue("propertyWithGetterAndSetter.kt"); + fooBoxTest(); } public void testAbsExtension() throws Exception { - checkFooBoxIsTrue("absExtension.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ForeachTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ForeachTest.java index 3a8f2572a06..0d8fe7247ff 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ForeachTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ForeachTest.java @@ -26,10 +26,10 @@ public final class ForeachTest extends AbstractExpressionTest { } public void testForIteratesOverArray() throws Exception { - checkFooBoxIsTrue("forIteratesOverArray.kt"); + fooBoxTest(); } public void testForOnEmptyArray() throws Exception { - checkFooBoxIsTrue("forOnEmptyArray.kt"); + fooBoxTest(); } } \ No newline at end of file diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/FunctionTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/FunctionTest.java index 20eeae619cc..4015543b0a4 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/FunctionTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/FunctionTest.java @@ -28,27 +28,27 @@ public class FunctionTest extends AbstractExpressionTest { } public void testFunctionUsedBeforeDeclaration() throws Exception { - checkFooBoxIsTrue("functionUsedBeforeDeclaration.kt"); + fooBoxTest(); } public void testFunctionWithTwoParametersCall() throws Exception { - checkFooBoxIsTrue("functionWithTwoParametersCall.kt"); + fooBoxTest(); } public void testFunctionLiteral() throws Exception { - checkFooBoxIsTrue("functionLiteral.kt"); + fooBoxTest(); } public void testAdderClosure() throws Exception { - checkFooBoxIsTrue("adderClosure.kt"); + fooBoxTest(); } public void testLoopClosure() throws Exception { - checkFooBoxIsTrue("loopClosure.kt"); + fooBoxTest(); } public void testFunctionLiteralAsParameter() throws Exception { - checkFooBoxIsTrue("functionLiteralAsParameter.kt"); + fooBoxTest(); } public void testClosureWithParameter() throws Exception { @@ -65,32 +65,32 @@ public class FunctionTest extends AbstractExpressionTest { public void testImplicitItParameter() throws Exception { - checkFooBoxIsTrue("implicitItParameter.kt"); + fooBoxTest(); } public void testDefaultParameters() throws Exception { - checkFooBoxIsTrue("defaultParameters.kt"); + fooBoxTest(); } public void testFunctionLiteralAsLastParameter() throws Exception { - checkFooBoxIsTrue("functionLiteralAsLastParameter.kt"); + fooBoxTest(); } public void testNamedArguments() throws Exception { - checkFooBoxIsTrue("namedArguments.kt"); + fooBoxTest(); } public void testExpressionAsFunction() throws Exception { - checkFooBoxIsTrue("expressionAsFunction.kt"); + fooBoxTest(); } public void testVararg() throws Exception { - checkFooBoxIsTrue("vararg.kt"); + fooBoxTest(); } //TODO: disabled. Probable cause : vars in closures. @@ -103,6 +103,6 @@ public class FunctionTest extends AbstractExpressionTest { // } public void testFunctionInsideFunction() throws Exception { - checkFooBoxIsTrue("functionInsideFunction.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/InlineTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/InlineTest.java index 852a41e5288..7f808428247 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/InlineTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/InlineTest.java @@ -67,7 +67,7 @@ public final class InlineTest extends SingleFileTranslationTest { } private void checkFooBoxIsTrueAndFunctionNameIsNotReferenced(@NotNull String filename, String funName) throws Exception { - checkFooBoxIsTrue(filename); + fooBoxTest(); String generatedJSFilePath = getOutputFilePath(filename); String outputFileText = FileUtil.loadFile(new File(generatedJSFilePath)); assertTrue(countOccurrences(outputFileText, funName) == 1); 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 81bb30e7e72..1fa25a13f89 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 @@ -36,12 +36,12 @@ public final class MiscTest extends AbstractExpressionTest { } public void testIntRange() throws Exception { - checkFooBoxIsTrue("intRange.kt"); + fooBoxTest(); } public void testSafecallComputesExpressionOnlyOnce() throws Exception { - checkFooBoxIsTrue("safecallComputesExpressionOnlyOnce.kt"); + fooBoxTest(); } public void testClassWithoutNamespace() throws Exception { @@ -50,7 +50,7 @@ public final class MiscTest extends AbstractExpressionTest { public void testIfElseAsExpressionWithThrow() throws Exception { try { - checkFooBoxIsTrue("ifAsExpressionWithThrow.kt"); + fooBoxTest(); fail(); } catch (JavaScriptException e) { @@ -91,39 +91,39 @@ public final class MiscTest extends AbstractExpressionTest { } public void testFunInConstructor() throws Exception { - checkFooBoxIsTrue("funInConstructor.kt"); + fooBoxTest(); } public void testFunInConstructorBlock() throws Exception { - checkFooBoxIsTrue("funInConstructorBlock.kt"); + fooBoxTest(); } public void testPropertyAsFunCalledOnConstructor() throws Exception { - checkFooBoxIsTrue("propertyAsFunCalledOnConstructor.kt"); + fooBoxTest(); } public void testNamespacePropertyCalledAsFun() throws Exception { - checkFooBoxIsTrue("namespacePropertyCalledAsFun.kt"); + fooBoxTest(); } public void testExtensionLiteralCreatedAtNamespaceLevel() throws Exception { - checkFooBoxIsTrue("extensionLiteralCreatedAtNamespaceLevel.kt"); + fooBoxTest(); } public void testTemporaryVariableCreatedInNamespaceInitializer() throws Exception { - checkFooBoxIsTrue("temporaryVariableCreatedInNamespaceInitializer.kt"); + fooBoxTest(); } public void testWhenReturnedWithoutBlock() throws Exception { - checkFooBoxIsTrue("whenReturnedWithoutBlock.kt"); + fooBoxTest(); } public void testElvis() throws Exception { - checkFooBoxIsTrue("elvis.kt"); + fooBoxTest(); } public void testExtensionLiteralCalledInsideExtensionFunction() throws Exception { - checkFooBoxIsTrue("extensionLiteralCalledInsideExtensionFunction.kt"); + fooBoxTest(); } public void testKt1865() throws Exception { @@ -136,6 +136,6 @@ public final class MiscTest extends AbstractExpressionTest { public void testPropertiesWithExplicitlyDefinedAccessorsWithoutBodies() throws Exception { - checkFooBoxIsTrue("propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/NameClashesTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/NameClashesTest.java index 421e8a072f0..ad7aeb03dd6 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/NameClashesTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/NameClashesTest.java @@ -29,6 +29,6 @@ public final class NameClashesTest extends SingleFileTranslationTest { } public void testMethodOverload() throws Exception { - checkFooBoxIsTrue("methodOverload.kt"); + fooBoxTest(); } } \ No newline at end of file diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/NativeInteropTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/NativeInteropTest.java index 852d4c67f73..c85eae2ed83 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/NativeInteropTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/NativeInteropTest.java @@ -43,19 +43,19 @@ public final class NativeInteropTest extends SingleFileTranslationTest { } public void testSimple() throws Exception { - checkFooBoxIsTrue("simple.kt"); + fooBoxTest(); } public void testClass() throws Exception { - checkFooBoxIsTrue("class.kt"); + fooBoxTest(); } public void testVararg() throws Exception { - checkFooBoxIsTrue("vararg.kt"); + fooBoxTest(); } public void testUndefined() throws Exception { - checkFooBoxIsTrue("undefined.kt"); + fooBoxTest(); } public void testKt1519() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ObjectTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ObjectTest.java index d4aea34083d..51eed910ebd 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ObjectTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ObjectTest.java @@ -28,22 +28,22 @@ public final class ObjectTest extends SingleFileTranslationTest { } public void testObjectWithMethods() throws Exception { - checkFooBoxIsTrue("objectWithMethods.kt"); + fooBoxTest(); } public void testObjectDeclaration() throws Exception { - checkFooBoxIsTrue("objectDeclaration.kt"); + fooBoxTest(); } public void testObjectInMethod() throws Exception { - checkFooBoxIsTrue("objectInMethod.kt"); + fooBoxTest(); } public void testObjectInheritingFromATrait() throws Exception { - checkFooBoxIsTrue("objectInheritingFromATrait.kt"); + fooBoxTest(); } } \ No newline at end of file diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/OperatorOverloadingTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/OperatorOverloadingTest.java index 908f241f070..9b2a0c962b0 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/OperatorOverloadingTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/OperatorOverloadingTest.java @@ -28,76 +28,76 @@ public final class OperatorOverloadingTest extends SingleFileTranslationTest { } public void testPlusOverload() throws Exception { - checkFooBoxIsTrue("plusOverload.kt"); + fooBoxTest(); } public void testPostfixInc() throws Exception { - checkFooBoxIsTrue("postfixIncOverload.kt"); + fooBoxTest(); } public void testPrefixDecOverload() throws Exception { - checkFooBoxIsTrue("prefixDecOverload.kt"); + fooBoxTest(); } public void testPrefixIncReturnsCorrectValue() throws Exception { - checkFooBoxIsTrue("prefixIncReturnsCorrectValue.kt"); + fooBoxTest(); } public void testOverloadedCallOnProperty() throws Exception { - checkFooBoxIsTrue("overloadedCallOnProperty.kt"); + fooBoxTest(); } public void testPostfixOnProperty() throws Exception { - checkFooBoxIsTrue("postfixOnProperty.kt"); + fooBoxTest(); } public void testOperatorOverloadOnPropertyCallGetterAndSetterOnlyOnce() throws Exception { - checkFooBoxIsTrue("operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt"); + fooBoxTest(); } public void testUnaryOnIntProperty() throws Exception { - checkFooBoxIsTrue("unaryOnIntProperty.kt"); + fooBoxTest(); } public void testUnaryOnIntPropertyAsStatement() throws Exception { - checkFooBoxIsTrue("unaryOnIntProperty2.kt"); + fooBoxTest(); } public void testBinaryDivOverload() throws Exception { - checkFooBoxIsTrue("binaryDivOverload.kt"); + fooBoxTest(); } public void testPlusAssignNoReassign() throws Exception { - checkFooBoxIsTrue("plusAssignNoReassign.kt"); + fooBoxTest(); } public void testNotOverload() throws Exception { - checkFooBoxIsTrue("notOverload.kt"); + fooBoxTest(); } public void testCompareTo() throws Exception { - checkFooBoxIsTrue("compareTo.kt"); + fooBoxTest(); } public void testPlusAndMinusAsAnExpression() throws Exception { - checkFooBoxIsTrue("plusAndMinusAsAnExpression.kt"); + fooBoxTest(); } public void testUsingModInCaseModAssignNotAvailable() throws Exception { - checkFooBoxIsTrue("usingModInCaseModAssignNotAvailable.kt"); + fooBoxTest(); } public void testOverloadPlusAssignArrayList() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PatternMatchingTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PatternMatchingTest.java index 6a6759331c3..2cfd988f3f6 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PatternMatchingTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PatternMatchingTest.java @@ -29,31 +29,31 @@ public final class PatternMatchingTest extends SingleFileTranslationTest { } public void testWhenType() throws Exception { - checkFooBoxIsTrue("whenType.kt"); + fooBoxTest(); } public void testWhenNotType() throws Exception { - checkFooBoxIsTrue("whenNotType.kt"); + fooBoxTest(); } public void testWhenExecutesOnlyOnce() throws Exception { - checkFooBoxIsTrue("whenExecutesOnlyOnce.kt"); + fooBoxTest(); } public void testWhenValue() throws Exception { - checkFooBoxIsTrue("whenValue.kt"); + fooBoxTest(); } public void testWhenNotValue() throws Exception { - checkFooBoxIsTrue("whenNotValue.kt"); + fooBoxTest(); } public void testWhenValueOrType() throws Exception { - checkFooBoxIsTrue("whenValueOrType.kt"); + fooBoxTest(); } public void testWhenWithIf() throws Exception { - checkFooBoxIsTrue("whenWithIf.kt"); + fooBoxTest(); } public void testMultipleCases() throws Exception { @@ -61,16 +61,16 @@ public final class PatternMatchingTest extends SingleFileTranslationTest { } public void testMatchNullableType() throws Exception { - checkFooBoxIsTrue("matchNullableType.kt"); + fooBoxTest(); } public void testWhenAsExpression() throws Exception { - checkFooBoxIsTrue("whenAsExpression.kt"); + fooBoxTest(); } public void testWhenAsExpressionWithThrow() throws Exception { try { - checkFooBoxIsTrue("whenAsExpressionWithThrow.kt"); + fooBoxTest(); fail(); } catch (JavaScriptException e) { @@ -82,6 +82,6 @@ public final class PatternMatchingTest extends SingleFileTranslationTest { } public void testWhenWithoutExpression() throws Exception { - checkFooBoxIsTrue("whenWithoutExpression.kt"); + fooBoxTest(); } } \ No newline at end of file diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java index b0337104eaa..7bad8bd9f53 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java @@ -28,12 +28,12 @@ public final class PropertyAccessTest extends SingleFileTranslationTest { } public void testAccessToInstanceProperty() throws Exception { - checkFooBoxIsTrue("accessToInstanceProperty.kt"); + fooBoxTest(); } public void testTwoClassesWithProperties() throws Exception { - checkFooBoxIsTrue("twoClassesWithProperties.kt"); + fooBoxTest(); } @@ -43,34 +43,34 @@ public final class PropertyAccessTest extends SingleFileTranslationTest { public void testCustomGetter() throws Exception { - checkFooBoxIsTrue("customGetter.kt"); + fooBoxTest(); } public void testCustomSetter() throws Exception { - checkFooBoxIsTrue("customSetter.kt"); + fooBoxTest(); } public void testNamespacePropertyInitializer() throws Exception { - checkFooBoxIsTrue("namespacePropertyInitializer.kt"); + fooBoxTest(); } public void testNamespacePropertySet() throws Exception { - checkFooBoxIsTrue("namespacePropertySet.kt"); + fooBoxTest(); } public void testNamespaceCustomAccessors() throws Exception { - checkFooBoxIsTrue("namespaceCustomAccessors.kt"); + fooBoxTest(); } public void testClassUsesNamespaceProperties() throws Exception { - checkFooBoxIsTrue("classUsesNamespaceProperties.kt"); + fooBoxTest(); } public void testExtensionLiteralSafeCall() throws Exception { - checkFooBoxIsTrue("extensionLiteralSafeCall.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/RTTITest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/RTTITest.java index 5b4d3c39a5f..878ee527ae9 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/RTTITest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/RTTITest.java @@ -28,10 +28,10 @@ public class RTTITest extends SingleFileTranslationTest { } public void testIsSameClass() throws Exception { - checkFooBoxIsTrue("isSameClass.kt"); + fooBoxTest(); } public void testNotIsOtherClass() throws Exception { - checkFooBoxIsTrue("notIsOtherClass.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/RangeTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/RangeTest.java index 6aff22c38b3..10a497e40a9 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/RangeTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/RangeTest.java @@ -28,20 +28,20 @@ public final class RangeTest extends SingleFileTranslationTest { } public void testExplicitRange() throws Exception { - checkFooBoxIsTrue("explicitRange.kt"); + fooBoxTest(); } public void testRangeSugarSyntax() throws Exception { - checkFooBoxIsTrue("rangeSugarSyntax.kt"); + fooBoxTest(); } public void testIntInRange() throws Exception { - checkFooBoxIsTrue("intInRange.kt"); + fooBoxTest(); } public void testIteratingOverRanges() throws Exception { - checkFooBoxIsTrue("iteratingOverRanges.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/SafeCallTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/SafeCallTest.java index a07341c8f1b..223fe940d79 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/SafeCallTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/SafeCallTest.java @@ -28,7 +28,7 @@ public final class SafeCallTest extends SingleFileTranslationTest { } public void testSafeAccess() throws Exception { - checkFooBoxIsTrue("safeAccess.kt"); + fooBoxTest(); } public void testSafeExtensionFunctionCall() throws Exception { @@ -36,10 +36,10 @@ public final class SafeCallTest extends SingleFileTranslationTest { } public void testSafeCall() throws Exception { - checkFooBoxIsTrue("safeCall.kt"); + fooBoxTest(); } public void testSafeCallReturnsNullIfFails() throws Exception { - checkFooBoxIsTrue("safeCallReturnsNullIfFails.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/StandardClassesTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/StandardClassesTest.java index 55632d8c93b..8a02744a4ac 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/StandardClassesTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/StandardClassesTest.java @@ -28,38 +28,38 @@ public final class StandardClassesTest extends SingleFileTranslationTest { } public void testArray() throws Exception { - checkFooBoxIsTrue("array.kt"); + fooBoxTest(); } public void testArrayAccess() throws Exception { - checkFooBoxIsTrue("arrayAccess.kt"); + fooBoxTest(); } public void testArrayIsFilledWithNulls() throws Exception { - checkFooBoxIsTrue("arrayIsFilledWithNulls.kt"); + fooBoxTest(); } public void testArrayFunctionConstructor() throws Exception { - checkFooBoxIsTrue("arrayFunctionConstructor.kt"); + fooBoxTest(); } public void testArraySize() throws Exception { - checkFooBoxIsTrue("arraySize.kt"); + fooBoxTest(); } //TODO: this feature in not supported for some time //TODO: support it. Probably configurable. // (expected = JavaScriptException.class) // public void arrayThrowsExceptionOnOOBaccess() throws Exception { -// checkFooBoxIsTrue("arrayThrowsExceptionOnOOBaccess.kt"); +// fooBoxTest(); // } public void testArraysIterator() throws Exception { - checkFooBoxIsTrue("arraysIterator.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/StringTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/StringTest.java index 3773a7b1a44..b7d2d4525e8 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/StringTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/StringTest.java @@ -26,11 +26,11 @@ public final class StringTest extends AbstractExpressionTest { } public void testStringConstant() throws Exception { - checkFooBoxIsTrue("stringConstant.kt"); + fooBoxTest(); } public void testStringAssignment() throws Exception { - checkFooBoxIsTrue("stringAssignment.kt"); + fooBoxTest(); } public void testIntInTemplate() throws Exception { @@ -45,7 +45,7 @@ public final class StringTest extends AbstractExpressionTest { runFunctionOutputTest("multipleExpressionsInTemplate.kt", "foo", "box", "left = 3\nright = 2\nsum = 5\n"); } - public void testToStringMethod() throws Exception { - checkFooBoxIsTrue("objectToStringCallInTemplate.kt"); + public void testObjectToStringCallInTemplate() throws Exception { + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/TraitTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/TraitTest.java index b391b6920cf..9c7a9fee62f 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/TraitTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/TraitTest.java @@ -28,32 +28,32 @@ public final class TraitTest extends SingleFileTranslationTest { } public void testTraitAddsFunctionsToClass() throws Exception { - checkFooBoxIsTrue("traitAddsFunctionsToClass.kt"); + fooBoxTest(); } public void testClassDerivesFromClassAndTrait() throws Exception { - checkFooBoxIsTrue("classDerivesFromClassAndTrait.kt"); + fooBoxTest(); } public void testClassDerivesFromTraitAndClass() throws Exception { - checkFooBoxIsTrue("classDerivesFromTraitAndClass.kt"); + fooBoxTest(); } public void testExample() throws Exception { - checkFooBoxIsTrue("example.kt"); + fooBoxTest(); } public void testTraitExtendsTrait() throws Exception { - checkFooBoxIsTrue("traitExtendsTrait.kt"); + fooBoxTest(); } public void testTraitExtendsTwoTraits() throws Exception { - checkFooBoxIsTrue("traitExtendsTwoTraits.kt"); + fooBoxTest(); } @@ -63,6 +63,6 @@ public final class TraitTest extends SingleFileTranslationTest { public void testDefinitionOrder() throws Exception { - checkFooBoxIsTrue("definitionOrder.kt"); + fooBoxTest(); } } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/TupleTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/TupleTest.java index c1ba39cb37c..b1506a2cbd3 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/TupleTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/TupleTest.java @@ -29,11 +29,11 @@ public final class TupleTest extends SingleFileTranslationTest { } public void testTwoElements() throws Exception { - checkFooBoxIsTrue("twoElements.kt"); + fooBoxTest(); } public void testMultipleMembers() throws Exception { - checkFooBoxIsTrue("multipleMembers.kt"); + fooBoxTest(); } diff --git a/js/js.translator/testFiles/expression/misc/cases/ifAsExpressionWithThrow.kt b/js/js.translator/testFiles/expression/misc/cases/ifElseAsExpressionWithThrow.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/ifAsExpressionWithThrow.kt rename to js/js.translator/testFiles/expression/misc/cases/ifElseAsExpressionWithThrow.kt diff --git a/js/js.translator/testFiles/operatorOverloading/cases/postfixIncOverload.kt b/js/js.translator/testFiles/operatorOverloading/cases/postfixInc.kt similarity index 100% rename from js/js.translator/testFiles/operatorOverloading/cases/postfixIncOverload.kt rename to js/js.translator/testFiles/operatorOverloading/cases/postfixInc.kt diff --git a/js/js.translator/testFiles/operatorOverloading/cases/unaryOnIntProperty2.kt b/js/js.translator/testFiles/operatorOverloading/cases/unaryOnIntPropertyAsStatement.kt similarity index 100% rename from js/js.translator/testFiles/operatorOverloading/cases/unaryOnIntProperty2.kt rename to js/js.translator/testFiles/operatorOverloading/cases/unaryOnIntPropertyAsStatement.kt