[JVM] Port remaining line number tests to stepping infrastructure.

These line number tests only tested that a set of line numbers where
present in the java bytecode. Not that they would be hit in the
right order by the debugger. Moving them to stepping tests fixes that.

This exposes a couple of issues (in particular around try-catch-finally)
that should be fixed.

A number of tests are marked as failing now. Will investigate and
work on fixes next.
This commit is contained in:
Mads Ager
2020-05-26 14:33:36 +02:00
committed by max-kammerer
parent 5db6a0b563
commit 7d7b9262e7
60 changed files with 1462 additions and 1039 deletions
@@ -1,173 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.codegen;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/lineNumber")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class LineNumberTestGenerated extends AbstractLineNumberTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInLineNumber() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("compiler/testData/lineNumber/custom")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Custom extends AbstractLineNumberTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInCustom() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber/custom"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("beforeGotoToWhileStart.kt")
public void testBeforeGotoToWhileStart() throws Exception {
runTest("compiler/testData/lineNumber/custom/beforeGotoToWhileStart.kt");
}
@TestMetadata("callWithCallInArguments.kt")
public void testCallWithCallInArguments() throws Exception {
runTest("compiler/testData/lineNumber/custom/callWithCallInArguments.kt");
}
@TestMetadata("callWithReceiver.kt")
public void testCallWithReceiver() throws Exception {
runTest("compiler/testData/lineNumber/custom/callWithReceiver.kt");
}
@TestMetadata("chainCall.kt")
public void testChainCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/chainCall.kt");
}
@TestMetadata("compileTimeConstant.kt")
public void testCompileTimeConstant() throws Exception {
runTest("compiler/testData/lineNumber/custom/compileTimeConstant.kt");
}
@TestMetadata("functionCallWithDefault.kt")
public void testFunctionCallWithDefault() throws Exception {
runTest("compiler/testData/lineNumber/custom/functionCallWithDefault.kt");
}
@TestMetadata("functionCallWithInlinedLambdaParam.kt")
public void testFunctionCallWithInlinedLambdaParam() throws Exception {
runTest("compiler/testData/lineNumber/custom/functionCallWithInlinedLambdaParam.kt");
}
@TestMetadata("functionCallWithLambdaParam.kt")
public void testFunctionCallWithLambdaParam() throws Exception {
runTest("compiler/testData/lineNumber/custom/functionCallWithLambdaParam.kt");
}
@TestMetadata("ifThen.kt")
public void testIfThen() throws Exception {
runTest("compiler/testData/lineNumber/custom/ifThen.kt");
}
@TestMetadata("ifThenElse.kt")
public void testIfThenElse() throws Exception {
runTest("compiler/testData/lineNumber/custom/ifThenElse.kt");
}
@TestMetadata("ifThenElseFalse.kt")
public void testIfThenElseFalse() throws Exception {
runTest("compiler/testData/lineNumber/custom/ifThenElseFalse.kt");
}
@TestMetadata("inTheEndOfLambdaArgumentOfInlineCall.kt")
public void testInTheEndOfLambdaArgumentOfInlineCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt");
}
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("compiler/testData/lineNumber/custom/initBlocks.kt");
}
@TestMetadata("multilineFunctionCall.kt")
public void testMultilineFunctionCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/multilineFunctionCall.kt");
}
@TestMetadata("multilineInfixCall.kt")
public void testMultilineInfixCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/multilineInfixCall.kt");
}
@TestMetadata("noParametersArgumentCallInExpression.kt")
public void testNoParametersArgumentCallInExpression() throws Exception {
runTest("compiler/testData/lineNumber/custom/noParametersArgumentCallInExpression.kt");
}
@TestMetadata("primitiveNullChecks.kt")
public void testPrimitiveNullChecks() throws Exception {
runTest("compiler/testData/lineNumber/custom/primitiveNullChecks.kt");
}
@TestMetadata("smapInlineAsArgument.kt")
public void testSmapInlineAsArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineAsArgument.kt");
}
@TestMetadata("smapInlineAsInfixArgument.kt")
public void testSmapInlineAsInfixArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineAsInfixArgument.kt");
}
@TestMetadata("smapInlineAsInlineArgument.kt")
public void testSmapInlineAsInlineArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt");
}
@TestMetadata("smapInlineInIntrinsicArgument.kt")
public void testSmapInlineInIntrinsicArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineInIntrinsicArgument.kt");
}
@TestMetadata("tryCatchExpression.kt")
public void testTryCatchExpression() throws Exception {
runTest("compiler/testData/lineNumber/custom/tryCatchExpression.kt");
}
@TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception {
runTest("compiler/testData/lineNumber/custom/tryCatchFinally.kt");
}
@TestMetadata("tryFinally.kt")
public void testTryFinally() throws Exception {
runTest("compiler/testData/lineNumber/custom/tryFinally.kt");
}
@TestMetadata("when.kt")
public void testWhen() throws Exception {
runTest("compiler/testData/lineNumber/custom/when.kt");
}
@TestMetadata("whenSubject.kt")
public void testWhenSubject() throws Exception {
runTest("compiler/testData/lineNumber/custom/whenSubject.kt");
}
}
}
@@ -43,12 +43,36 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/assertion.kt");
}
@Test
@TestMetadata("beforeGotoToWhileStart.kt")
public void testBeforeGotoToWhileStart() throws Exception {
runTest("compiler/testData/debug/stepping/beforeGotoToWhileStart.kt");
}
@Test
@TestMetadata("callWithCallInArguments.kt")
public void testCallWithCallInArguments() throws Exception {
runTest("compiler/testData/debug/stepping/callWithCallInArguments.kt");
}
@Test
@TestMetadata("callWithReceiver.kt")
public void testCallWithReceiver() throws Exception {
runTest("compiler/testData/debug/stepping/callWithReceiver.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() throws Exception {
runTest("compiler/testData/debug/stepping/callableReference.kt");
}
@Test
@TestMetadata("chainCall.kt")
public void testChainCall() throws Exception {
runTest("compiler/testData/debug/stepping/chainCall.kt");
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
@@ -61,6 +85,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/classObject.kt");
}
@Test
@TestMetadata("compileTimeConstant.kt")
public void testCompileTimeConstant() throws Exception {
runTest("compiler/testData/debug/stepping/compileTimeConstant.kt");
}
@Test
@TestMetadata("conjunction.kt")
public void testConjunction() throws Exception {
@@ -85,6 +115,24 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/for.kt");
}
@Test
@TestMetadata("functionCallWithDefault.kt")
public void testFunctionCallWithDefault() throws Exception {
runTest("compiler/testData/debug/stepping/functionCallWithDefault.kt");
}
@Test
@TestMetadata("functionCallWithInlinedLambdaParam.kt")
public void testFunctionCallWithInlinedLambdaParam() throws Exception {
runTest("compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt");
}
@Test
@TestMetadata("functionCallWithLambdaParam.kt")
public void testFunctionCallWithLambdaParam() throws Exception {
runTest("compiler/testData/debug/stepping/functionCallWithLambdaParam.kt");
}
@Test
@TestMetadata("functionInAnotherFile.kt")
public void testFunctionInAnotherFile() throws Exception {
@@ -103,6 +151,24 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/if2.kt");
}
@Test
@TestMetadata("ifThen.kt")
public void testIfThen() throws Exception {
runTest("compiler/testData/debug/stepping/ifThen.kt");
}
@Test
@TestMetadata("ifThenElse.kt")
public void testIfThenElse() throws Exception {
runTest("compiler/testData/debug/stepping/ifThenElse.kt");
}
@Test
@TestMetadata("ifThenElseFalse.kt")
public void testIfThenElseFalse() throws Exception {
runTest("compiler/testData/debug/stepping/ifThenElseFalse.kt");
}
@Test
@TestMetadata("IfTrueThenFalse.kt")
public void testIfTrueThenFalse() throws Exception {
@@ -115,6 +181,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/iincStepping.kt");
}
@Test
@TestMetadata("inTheEndOfLambdaArgumentOfInlineCall.kt")
public void testInTheEndOfLambdaArgumentOfInlineCall() throws Exception {
runTest("compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt");
}
@Test
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("compiler/testData/debug/stepping/initBlocks.kt");
}
@Test
@TestMetadata("inlineCallableReference.kt")
public void testInlineCallableReference() throws Exception {
@@ -157,6 +235,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/localFunction.kt");
}
@Test
@TestMetadata("multilineFunctionCall.kt")
public void testMultilineFunctionCall() throws Exception {
runTest("compiler/testData/debug/stepping/multilineFunctionCall.kt");
}
@Test
@TestMetadata("multilineInfixCall.kt")
public void testMultilineInfixCall() throws Exception {
runTest("compiler/testData/debug/stepping/multilineInfixCall.kt");
}
@Test
@TestMetadata("namedCallableReference.kt")
public void testNamedCallableReference() throws Exception {
@@ -169,6 +259,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/nestedInline.kt");
}
@Test
@TestMetadata("noParametersArgumentCallInExpression.kt")
public void testNoParametersArgumentCallInExpression() throws Exception {
runTest("compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt");
}
@Test
@TestMetadata("primitiveNullChecks.kt")
public void testPrimitiveNullChecks() throws Exception {
runTest("compiler/testData/debug/stepping/primitiveNullChecks.kt");
}
@Test
@TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception {
@@ -211,6 +313,30 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/simpleSmap.kt");
}
@Test
@TestMetadata("smapInlineAsArgument.kt")
public void testSmapInlineAsArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineAsArgument.kt");
}
@Test
@TestMetadata("smapInlineAsInfixArgument.kt")
public void testSmapInlineAsInfixArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt");
}
@Test
@TestMetadata("smapInlineAsInlineArgument.kt")
public void testSmapInlineAsInlineArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt");
}
@Test
@TestMetadata("smapInlineInIntrinsicArgument.kt")
public void testSmapInlineInIntrinsicArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt");
}
@Test
@TestMetadata("throwException.kt")
public void testThrowException() throws Exception {
@@ -235,12 +361,42 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/tryCatch.kt");
}
@Test
@TestMetadata("tryCatchExpression.kt")
public void testTryCatchExpression() throws Exception {
runTest("compiler/testData/debug/stepping/tryCatchExpression.kt");
}
@Test
@TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception {
runTest("compiler/testData/debug/stepping/tryCatchFinally.kt");
}
@Test
@TestMetadata("tryFinally.kt")
public void testTryFinally() throws Exception {
runTest("compiler/testData/debug/stepping/tryFinally.kt");
}
@Test
@TestMetadata("voidLambdaStepInline.kt")
public void testVoidLambdaStepInline() throws Exception {
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
}
@Test
@TestMetadata("when.kt")
public void testWhen() throws Exception {
runTest("compiler/testData/debug/stepping/when.kt");
}
@Test
@TestMetadata("whenSubject.kt")
public void testWhenSubject() throws Exception {
runTest("compiler/testData/debug/stepping/whenSubject.kt");
}
@Test
@TestMetadata("while.kt")
public void testWhile() throws Exception {
@@ -43,12 +43,36 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/assertion.kt");
}
@Test
@TestMetadata("beforeGotoToWhileStart.kt")
public void testBeforeGotoToWhileStart() throws Exception {
runTest("compiler/testData/debug/stepping/beforeGotoToWhileStart.kt");
}
@Test
@TestMetadata("callWithCallInArguments.kt")
public void testCallWithCallInArguments() throws Exception {
runTest("compiler/testData/debug/stepping/callWithCallInArguments.kt");
}
@Test
@TestMetadata("callWithReceiver.kt")
public void testCallWithReceiver() throws Exception {
runTest("compiler/testData/debug/stepping/callWithReceiver.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() throws Exception {
runTest("compiler/testData/debug/stepping/callableReference.kt");
}
@Test
@TestMetadata("chainCall.kt")
public void testChainCall() throws Exception {
runTest("compiler/testData/debug/stepping/chainCall.kt");
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
@@ -61,6 +85,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/classObject.kt");
}
@Test
@TestMetadata("compileTimeConstant.kt")
public void testCompileTimeConstant() throws Exception {
runTest("compiler/testData/debug/stepping/compileTimeConstant.kt");
}
@Test
@TestMetadata("conjunction.kt")
public void testConjunction() throws Exception {
@@ -85,6 +115,24 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/for.kt");
}
@Test
@TestMetadata("functionCallWithDefault.kt")
public void testFunctionCallWithDefault() throws Exception {
runTest("compiler/testData/debug/stepping/functionCallWithDefault.kt");
}
@Test
@TestMetadata("functionCallWithInlinedLambdaParam.kt")
public void testFunctionCallWithInlinedLambdaParam() throws Exception {
runTest("compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt");
}
@Test
@TestMetadata("functionCallWithLambdaParam.kt")
public void testFunctionCallWithLambdaParam() throws Exception {
runTest("compiler/testData/debug/stepping/functionCallWithLambdaParam.kt");
}
@Test
@TestMetadata("functionInAnotherFile.kt")
public void testFunctionInAnotherFile() throws Exception {
@@ -103,6 +151,24 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/if2.kt");
}
@Test
@TestMetadata("ifThen.kt")
public void testIfThen() throws Exception {
runTest("compiler/testData/debug/stepping/ifThen.kt");
}
@Test
@TestMetadata("ifThenElse.kt")
public void testIfThenElse() throws Exception {
runTest("compiler/testData/debug/stepping/ifThenElse.kt");
}
@Test
@TestMetadata("ifThenElseFalse.kt")
public void testIfThenElseFalse() throws Exception {
runTest("compiler/testData/debug/stepping/ifThenElseFalse.kt");
}
@Test
@TestMetadata("IfTrueThenFalse.kt")
public void testIfTrueThenFalse() throws Exception {
@@ -115,6 +181,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/iincStepping.kt");
}
@Test
@TestMetadata("inTheEndOfLambdaArgumentOfInlineCall.kt")
public void testInTheEndOfLambdaArgumentOfInlineCall() throws Exception {
runTest("compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt");
}
@Test
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("compiler/testData/debug/stepping/initBlocks.kt");
}
@Test
@TestMetadata("inlineCallableReference.kt")
public void testInlineCallableReference() throws Exception {
@@ -157,6 +235,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/localFunction.kt");
}
@Test
@TestMetadata("multilineFunctionCall.kt")
public void testMultilineFunctionCall() throws Exception {
runTest("compiler/testData/debug/stepping/multilineFunctionCall.kt");
}
@Test
@TestMetadata("multilineInfixCall.kt")
public void testMultilineInfixCall() throws Exception {
runTest("compiler/testData/debug/stepping/multilineInfixCall.kt");
}
@Test
@TestMetadata("namedCallableReference.kt")
public void testNamedCallableReference() throws Exception {
@@ -169,6 +259,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/nestedInline.kt");
}
@Test
@TestMetadata("noParametersArgumentCallInExpression.kt")
public void testNoParametersArgumentCallInExpression() throws Exception {
runTest("compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt");
}
@Test
@TestMetadata("primitiveNullChecks.kt")
public void testPrimitiveNullChecks() throws Exception {
runTest("compiler/testData/debug/stepping/primitiveNullChecks.kt");
}
@Test
@TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception {
@@ -211,6 +313,30 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/simpleSmap.kt");
}
@Test
@TestMetadata("smapInlineAsArgument.kt")
public void testSmapInlineAsArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineAsArgument.kt");
}
@Test
@TestMetadata("smapInlineAsInfixArgument.kt")
public void testSmapInlineAsInfixArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt");
}
@Test
@TestMetadata("smapInlineAsInlineArgument.kt")
public void testSmapInlineAsInlineArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt");
}
@Test
@TestMetadata("smapInlineInIntrinsicArgument.kt")
public void testSmapInlineInIntrinsicArgument() throws Exception {
runTest("compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt");
}
@Test
@TestMetadata("throwException.kt")
public void testThrowException() throws Exception {
@@ -235,12 +361,42 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/tryCatch.kt");
}
@Test
@TestMetadata("tryCatchExpression.kt")
public void testTryCatchExpression() throws Exception {
runTest("compiler/testData/debug/stepping/tryCatchExpression.kt");
}
@Test
@TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception {
runTest("compiler/testData/debug/stepping/tryCatchFinally.kt");
}
@Test
@TestMetadata("tryFinally.kt")
public void testTryFinally() throws Exception {
runTest("compiler/testData/debug/stepping/tryFinally.kt");
}
@Test
@TestMetadata("voidLambdaStepInline.kt")
public void testVoidLambdaStepInline() throws Exception {
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
}
@Test
@TestMetadata("when.kt")
public void testWhen() throws Exception {
runTest("compiler/testData/debug/stepping/when.kt");
}
@Test
@TestMetadata("whenSubject.kt")
public void testWhenSubject() throws Exception {
runTest("compiler/testData/debug/stepping/whenSubject.kt");
}
@Test
@TestMetadata("while.kt")
public void testWhile() throws Exception {
@@ -1,174 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.codegen.ir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/lineNumber")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class IrLineNumberTestGenerated extends AbstractIrLineNumberTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInLineNumber() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/lineNumber/custom")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Custom extends AbstractIrLineNumberTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInCustom() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber/custom"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("beforeGotoToWhileStart.kt")
public void testBeforeGotoToWhileStart() throws Exception {
runTest("compiler/testData/lineNumber/custom/beforeGotoToWhileStart.kt");
}
@TestMetadata("callWithCallInArguments.kt")
public void testCallWithCallInArguments() throws Exception {
runTest("compiler/testData/lineNumber/custom/callWithCallInArguments.kt");
}
@TestMetadata("callWithReceiver.kt")
public void testCallWithReceiver() throws Exception {
runTest("compiler/testData/lineNumber/custom/callWithReceiver.kt");
}
@TestMetadata("chainCall.kt")
public void testChainCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/chainCall.kt");
}
@TestMetadata("compileTimeConstant.kt")
public void testCompileTimeConstant() throws Exception {
runTest("compiler/testData/lineNumber/custom/compileTimeConstant.kt");
}
@TestMetadata("functionCallWithDefault.kt")
public void testFunctionCallWithDefault() throws Exception {
runTest("compiler/testData/lineNumber/custom/functionCallWithDefault.kt");
}
@TestMetadata("functionCallWithInlinedLambdaParam.kt")
public void testFunctionCallWithInlinedLambdaParam() throws Exception {
runTest("compiler/testData/lineNumber/custom/functionCallWithInlinedLambdaParam.kt");
}
@TestMetadata("functionCallWithLambdaParam.kt")
public void testFunctionCallWithLambdaParam() throws Exception {
runTest("compiler/testData/lineNumber/custom/functionCallWithLambdaParam.kt");
}
@TestMetadata("ifThen.kt")
public void testIfThen() throws Exception {
runTest("compiler/testData/lineNumber/custom/ifThen.kt");
}
@TestMetadata("ifThenElse.kt")
public void testIfThenElse() throws Exception {
runTest("compiler/testData/lineNumber/custom/ifThenElse.kt");
}
@TestMetadata("ifThenElseFalse.kt")
public void testIfThenElseFalse() throws Exception {
runTest("compiler/testData/lineNumber/custom/ifThenElseFalse.kt");
}
@TestMetadata("inTheEndOfLambdaArgumentOfInlineCall.kt")
public void testInTheEndOfLambdaArgumentOfInlineCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt");
}
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("compiler/testData/lineNumber/custom/initBlocks.kt");
}
@TestMetadata("multilineFunctionCall.kt")
public void testMultilineFunctionCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/multilineFunctionCall.kt");
}
@TestMetadata("multilineInfixCall.kt")
public void testMultilineInfixCall() throws Exception {
runTest("compiler/testData/lineNumber/custom/multilineInfixCall.kt");
}
@TestMetadata("noParametersArgumentCallInExpression.kt")
public void testNoParametersArgumentCallInExpression() throws Exception {
runTest("compiler/testData/lineNumber/custom/noParametersArgumentCallInExpression.kt");
}
@TestMetadata("primitiveNullChecks.kt")
public void testPrimitiveNullChecks() throws Exception {
runTest("compiler/testData/lineNumber/custom/primitiveNullChecks.kt");
}
@TestMetadata("smapInlineAsArgument.kt")
public void testSmapInlineAsArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineAsArgument.kt");
}
@TestMetadata("smapInlineAsInfixArgument.kt")
public void testSmapInlineAsInfixArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineAsInfixArgument.kt");
}
@TestMetadata("smapInlineAsInlineArgument.kt")
public void testSmapInlineAsInlineArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt");
}
@TestMetadata("smapInlineInIntrinsicArgument.kt")
public void testSmapInlineInIntrinsicArgument() throws Exception {
runTest("compiler/testData/lineNumber/custom/smapInlineInIntrinsicArgument.kt");
}
@TestMetadata("tryCatchExpression.kt")
public void testTryCatchExpression() throws Exception {
runTest("compiler/testData/lineNumber/custom/tryCatchExpression.kt");
}
@TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception {
runTest("compiler/testData/lineNumber/custom/tryCatchFinally.kt");
}
@TestMetadata("tryFinally.kt")
public void testTryFinally() throws Exception {
runTest("compiler/testData/lineNumber/custom/tryFinally.kt");
}
@TestMetadata("when.kt")
public void testWhen() throws Exception {
runTest("compiler/testData/lineNumber/custom/when.kt");
}
@TestMetadata("whenSubject.kt")
public void testWhenSubject() throws Exception {
runTest("compiler/testData/lineNumber/custom/whenSubject.kt");
}
}
}
@@ -391,10 +391,6 @@ fun main() {
model("type/binding")
}
testClass<AbstractLineNumberTest> {
model("lineNumber")
}
testClass<AbstractSteppingTest>(useJunit4 = true) {
model("debug/stepping", targetBackend = TargetBackend.JVM)
}
@@ -485,10 +481,6 @@ fun main() {
model("loadJava/sourceJava", extension = "java", testMethod = "doTestSourceJava", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractIrLineNumberTest> {
model("lineNumber", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractIrSteppingTest>(useJunit4 = true) {
model("debug/stepping", targetBackend = TargetBackend.JVM_IR)
}