[JVM] Port line number tests to stepping framework.

Allow specifying JVM and JVM_IR as well as shared expectations.

Add the method name to the step.

Discard steps in synthetic methods.
This commit is contained in:
Mads Ager
2020-05-19 16:34:59 +02:00
committed by max-kammerer
parent 4dbd4a56d5
commit 9fa1614903
59 changed files with 896 additions and 540 deletions
@@ -28,96 +28,6 @@ public class LineNumberTestGenerated extends AbstractLineNumberTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("anonymousFunction.kt")
public void testAnonymousFunction() throws Exception {
runTest("compiler/testData/lineNumber/anonymousFunction.kt");
}
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("compiler/testData/lineNumber/class.kt");
}
@TestMetadata("classObject.kt")
public void testClassObject() throws Exception {
runTest("compiler/testData/lineNumber/classObject.kt");
}
@TestMetadata("defaultParameter.kt")
public void testDefaultParameter() throws Exception {
runTest("compiler/testData/lineNumber/defaultParameter.kt");
}
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/lineNumber/enum.kt");
}
@TestMetadata("for.kt")
public void testFor() throws Exception {
runTest("compiler/testData/lineNumber/for.kt");
}
@TestMetadata("if.kt")
public void testIf() throws Exception {
runTest("compiler/testData/lineNumber/if.kt");
}
@TestMetadata("inlineSimpleCall.kt")
public void testInlineSimpleCall() throws Exception {
runTest("compiler/testData/lineNumber/inlineSimpleCall.kt");
}
@TestMetadata("lineNumberAfterInline.kt")
public void testLineNumberAfterInline() throws Exception {
runTest("compiler/testData/lineNumber/lineNumberAfterInline.kt");
}
@TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception {
runTest("compiler/testData/lineNumber/localFunction.kt");
}
@TestMetadata("object.kt")
public void testObject() throws Exception {
runTest("compiler/testData/lineNumber/object.kt");
}
@TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception {
runTest("compiler/testData/lineNumber/propertyAccessor.kt");
}
@TestMetadata("psvm.kt")
public void testPsvm() throws Exception {
runTest("compiler/testData/lineNumber/psvm.kt");
}
@TestMetadata("simpleSmap.kt")
public void testSimpleSmap() throws Exception {
runTest("compiler/testData/lineNumber/simpleSmap.kt");
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("compiler/testData/lineNumber/topLevel.kt");
}
@TestMetadata("trait.kt")
public void testTrait() throws Exception {
runTest("compiler/testData/lineNumber/trait.kt");
}
@TestMetadata("tryCatch.kt")
public void testTryCatch() throws Exception {
runTest("compiler/testData/lineNumber/tryCatch.kt");
}
@TestMetadata("while.kt")
public void testWhile() throws Exception {
runTest("compiler/testData/lineNumber/while.kt");
}
@TestMetadata("compiler/testData/lineNumber/custom")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -31,6 +31,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("anonymousFunction.kt")
public void testAnonymousFunction() throws Exception {
runTest("compiler/testData/debug/stepping/anonymousFunction.kt");
}
@Test
@TestMetadata("assertion.kt")
public void testAssertion() throws Exception {
@@ -43,12 +49,36 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/callableReference.kt");
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("compiler/testData/debug/stepping/class.kt");
}
@Test
@TestMetadata("classObject.kt")
public void testClassObject() throws Exception {
runTest("compiler/testData/debug/stepping/classObject.kt");
}
@Test
@TestMetadata("conjunction.kt")
public void testConjunction() throws Exception {
runTest("compiler/testData/debug/stepping/conjunction.kt");
}
@Test
@TestMetadata("defaultParameter.kt")
public void testDefaultParameter() throws Exception {
runTest("compiler/testData/debug/stepping/defaultParameter.kt");
}
@Test
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/debug/stepping/enum.kt");
}
@Test
@TestMetadata("for.kt")
public void testFor() throws Exception {
@@ -67,6 +97,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/if.kt");
}
@Test
@TestMetadata("if2.kt")
public void testIf2() throws Exception {
runTest("compiler/testData/debug/stepping/if2.kt");
}
@Test
@TestMetadata("IfTrueThenFalse.kt")
public void testIfTrueThenFalse() throws Exception {
@@ -91,6 +127,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt");
}
@Test
@TestMetadata("inlineSimpleCall.kt")
public void testInlineSimpleCall() throws Exception {
runTest("compiler/testData/debug/stepping/inlineSimpleCall.kt");
}
@Test
@TestMetadata("lambdaStepInline.kt")
public void testLambdaStepInline() throws Exception {
@@ -103,6 +145,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt");
}
@Test
@TestMetadata("lineNumberAfterInline.kt")
public void testLineNumberAfterInline() throws Exception {
runTest("compiler/testData/debug/stepping/lineNumberAfterInline.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception {
runTest("compiler/testData/debug/stepping/localFunction.kt");
}
@Test
@TestMetadata("namedCallableReference.kt")
public void testNamedCallableReference() throws Exception {
@@ -115,6 +169,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/nestedInline.kt");
}
@Test
@TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception {
runTest("compiler/testData/debug/stepping/propertyAccessor.kt");
}
@Test
@TestMetadata("psvm.kt")
public void testPsvm() throws Exception {
runTest("compiler/testData/debug/stepping/psvm.kt");
}
@Test
@TestMetadata("recursion.kt")
public void testRecursion() throws Exception {
@@ -139,15 +205,45 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
}
@Test
@TestMetadata("simpleSmap.kt")
public void testSimpleSmap() throws Exception {
runTest("compiler/testData/debug/stepping/simpleSmap.kt");
}
@Test
@TestMetadata("throwException.kt")
public void testThrowException() throws Exception {
runTest("compiler/testData/debug/stepping/throwException.kt");
}
@Test
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("compiler/testData/debug/stepping/topLevel.kt");
}
@Test
@TestMetadata("trait.kt")
public void testTrait() throws Exception {
runTest("compiler/testData/debug/stepping/trait.kt");
}
@Test
@TestMetadata("tryCatch.kt")
public void testTryCatch() throws Exception {
runTest("compiler/testData/debug/stepping/tryCatch.kt");
}
@Test
@TestMetadata("voidLambdaStepInline.kt")
public void testVoidLambdaStepInline() throws Exception {
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
}
@Test
@TestMetadata("while.kt")
public void testWhile() throws Exception {
runTest("compiler/testData/debug/stepping/while.kt");
}
}
@@ -31,6 +31,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("anonymousFunction.kt")
public void testAnonymousFunction() throws Exception {
runTest("compiler/testData/debug/stepping/anonymousFunction.kt");
}
@Test
@TestMetadata("assertion.kt")
public void testAssertion() throws Exception {
@@ -43,12 +49,36 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/callableReference.kt");
}
@Test
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("compiler/testData/debug/stepping/class.kt");
}
@Test
@TestMetadata("classObject.kt")
public void testClassObject() throws Exception {
runTest("compiler/testData/debug/stepping/classObject.kt");
}
@Test
@TestMetadata("conjunction.kt")
public void testConjunction() throws Exception {
runTest("compiler/testData/debug/stepping/conjunction.kt");
}
@Test
@TestMetadata("defaultParameter.kt")
public void testDefaultParameter() throws Exception {
runTest("compiler/testData/debug/stepping/defaultParameter.kt");
}
@Test
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/debug/stepping/enum.kt");
}
@Test
@TestMetadata("for.kt")
public void testFor() throws Exception {
@@ -67,6 +97,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/if.kt");
}
@Test
@TestMetadata("if2.kt")
public void testIf2() throws Exception {
runTest("compiler/testData/debug/stepping/if2.kt");
}
@Test
@TestMetadata("IfTrueThenFalse.kt")
public void testIfTrueThenFalse() throws Exception {
@@ -91,6 +127,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt");
}
@Test
@TestMetadata("inlineSimpleCall.kt")
public void testInlineSimpleCall() throws Exception {
runTest("compiler/testData/debug/stepping/inlineSimpleCall.kt");
}
@Test
@TestMetadata("lambdaStepInline.kt")
public void testLambdaStepInline() throws Exception {
@@ -103,6 +145,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt");
}
@Test
@TestMetadata("lineNumberAfterInline.kt")
public void testLineNumberAfterInline() throws Exception {
runTest("compiler/testData/debug/stepping/lineNumberAfterInline.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception {
runTest("compiler/testData/debug/stepping/localFunction.kt");
}
@Test
@TestMetadata("namedCallableReference.kt")
public void testNamedCallableReference() throws Exception {
@@ -115,6 +169,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/nestedInline.kt");
}
@Test
@TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception {
runTest("compiler/testData/debug/stepping/propertyAccessor.kt");
}
@Test
@TestMetadata("psvm.kt")
public void testPsvm() throws Exception {
runTest("compiler/testData/debug/stepping/psvm.kt");
}
@Test
@TestMetadata("recursion.kt")
public void testRecursion() throws Exception {
@@ -139,15 +205,45 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
}
@Test
@TestMetadata("simpleSmap.kt")
public void testSimpleSmap() throws Exception {
runTest("compiler/testData/debug/stepping/simpleSmap.kt");
}
@Test
@TestMetadata("throwException.kt")
public void testThrowException() throws Exception {
runTest("compiler/testData/debug/stepping/throwException.kt");
}
@Test
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("compiler/testData/debug/stepping/topLevel.kt");
}
@Test
@TestMetadata("trait.kt")
public void testTrait() throws Exception {
runTest("compiler/testData/debug/stepping/trait.kt");
}
@Test
@TestMetadata("tryCatch.kt")
public void testTryCatch() throws Exception {
runTest("compiler/testData/debug/stepping/tryCatch.kt");
}
@Test
@TestMetadata("voidLambdaStepInline.kt")
public void testVoidLambdaStepInline() throws Exception {
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
}
@Test
@TestMetadata("while.kt")
public void testWhile() throws Exception {
runTest("compiler/testData/debug/stepping/while.kt");
}
}
@@ -29,96 +29,6 @@ public class IrLineNumberTestGenerated extends AbstractIrLineNumberTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("anonymousFunction.kt")
public void testAnonymousFunction() throws Exception {
runTest("compiler/testData/lineNumber/anonymousFunction.kt");
}
@TestMetadata("class.kt")
public void testClass() throws Exception {
runTest("compiler/testData/lineNumber/class.kt");
}
@TestMetadata("classObject.kt")
public void testClassObject() throws Exception {
runTest("compiler/testData/lineNumber/classObject.kt");
}
@TestMetadata("defaultParameter.kt")
public void testDefaultParameter() throws Exception {
runTest("compiler/testData/lineNumber/defaultParameter.kt");
}
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
runTest("compiler/testData/lineNumber/enum.kt");
}
@TestMetadata("for.kt")
public void testFor() throws Exception {
runTest("compiler/testData/lineNumber/for.kt");
}
@TestMetadata("if.kt")
public void testIf() throws Exception {
runTest("compiler/testData/lineNumber/if.kt");
}
@TestMetadata("inlineSimpleCall.kt")
public void testInlineSimpleCall() throws Exception {
runTest("compiler/testData/lineNumber/inlineSimpleCall.kt");
}
@TestMetadata("lineNumberAfterInline.kt")
public void testLineNumberAfterInline() throws Exception {
runTest("compiler/testData/lineNumber/lineNumberAfterInline.kt");
}
@TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception {
runTest("compiler/testData/lineNumber/localFunction.kt");
}
@TestMetadata("object.kt")
public void testObject() throws Exception {
runTest("compiler/testData/lineNumber/object.kt");
}
@TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception {
runTest("compiler/testData/lineNumber/propertyAccessor.kt");
}
@TestMetadata("psvm.kt")
public void testPsvm() throws Exception {
runTest("compiler/testData/lineNumber/psvm.kt");
}
@TestMetadata("simpleSmap.kt")
public void testSimpleSmap() throws Exception {
runTest("compiler/testData/lineNumber/simpleSmap.kt");
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("compiler/testData/lineNumber/topLevel.kt");
}
@TestMetadata("trait.kt")
public void testTrait() throws Exception {
runTest("compiler/testData/lineNumber/trait.kt");
}
@TestMetadata("tryCatch.kt")
public void testTryCatch() throws Exception {
runTest("compiler/testData/lineNumber/tryCatch.kt");
}
@TestMetadata("while.kt")
public void testWhile() throws Exception {
runTest("compiler/testData/lineNumber/while.kt");
}
@TestMetadata("compiler/testData/lineNumber/custom")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)