Refactor js.tests
Use Test#getName where possible
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@ public final class ClosureTest extends SingleFileTranslationTest {
|
||||
}
|
||||
|
||||
public void testIteratingCallbacks() throws Exception {
|
||||
checkFooBoxIsTrue("iteratingCallbacks.kt");
|
||||
fooBoxTest();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,6 @@ public final class NameClashesTest extends SingleFileTranslationTest {
|
||||
}
|
||||
|
||||
public void testMethodOverload() throws Exception {
|
||||
checkFooBoxIsTrue("methodOverload.kt");
|
||||
fooBoxTest();
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user