JVM: Add more tests to jvm-abi-gen
This commit is contained in:
committed by
Alexander Udalov
parent
d08990ebb4
commit
8efb955ab5
+40
@@ -30,6 +30,11 @@ public class CompareJvmAbiTestGenerated extends AbstractCompareJvmAbiTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/jvm-abi-gen/testData/compare"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM, false);
|
||||
}
|
||||
|
||||
@TestMetadata("anonymousObjects")
|
||||
public void testAnonymousObjects() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/anonymousObjects/");
|
||||
}
|
||||
|
||||
@TestMetadata("classFlags")
|
||||
public void testClassFlags() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/classFlags/");
|
||||
@@ -50,6 +55,31 @@ public class CompareJvmAbiTestGenerated extends AbstractCompareJvmAbiTest {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/constant/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrder")
|
||||
public void testDeclarationOrder() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrder/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInline")
|
||||
public void testDeclarationOrderInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInlineCall")
|
||||
public void testDeclarationOrderInlineCall() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInlineNonInline")
|
||||
public void testDeclarationOrderInlineNonInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineNonInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderPrivateInline")
|
||||
public void testDeclarationOrderPrivateInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("functionBody")
|
||||
public void testFunctionBody() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/functionBody/");
|
||||
@@ -60,6 +90,11 @@ public class CompareJvmAbiTestGenerated extends AbstractCompareJvmAbiTest {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/inlineFunctionBody/");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdas")
|
||||
public void testLambdas() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/lambdas/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterName")
|
||||
public void testParameterName() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/parameterName/");
|
||||
@@ -80,6 +115,11 @@ public class CompareJvmAbiTestGenerated extends AbstractCompareJvmAbiTest {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/superClass/");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticAccessors")
|
||||
public void testSyntheticAccessors() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/syntheticAccessors/");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelPrivateMembers")
|
||||
public void testTopLevelPrivateMembers() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/topLevelPrivateMembers/");
|
||||
|
||||
+40
@@ -30,6 +30,11 @@ public class IrCompareJvmAbiTestGenerated extends AbstractIrCompareJvmAbiTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/jvm-abi-gen/testData/compare"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, false);
|
||||
}
|
||||
|
||||
@TestMetadata("anonymousObjects")
|
||||
public void testAnonymousObjects() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/anonymousObjects/");
|
||||
}
|
||||
|
||||
@TestMetadata("classFlags")
|
||||
public void testClassFlags() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/classFlags/");
|
||||
@@ -50,6 +55,31 @@ public class IrCompareJvmAbiTestGenerated extends AbstractIrCompareJvmAbiTest {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/constant/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrder")
|
||||
public void testDeclarationOrder() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrder/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInline")
|
||||
public void testDeclarationOrderInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInlineCall")
|
||||
public void testDeclarationOrderInlineCall() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInlineNonInline")
|
||||
public void testDeclarationOrderInlineNonInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineNonInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderPrivateInline")
|
||||
public void testDeclarationOrderPrivateInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("functionBody")
|
||||
public void testFunctionBody() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/functionBody/");
|
||||
@@ -60,6 +90,11 @@ public class IrCompareJvmAbiTestGenerated extends AbstractIrCompareJvmAbiTest {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/inlineFunctionBody/");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdas")
|
||||
public void testLambdas() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/lambdas/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterName")
|
||||
public void testParameterName() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/parameterName/");
|
||||
@@ -80,6 +115,11 @@ public class IrCompareJvmAbiTestGenerated extends AbstractIrCompareJvmAbiTest {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/superClass/");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticAccessors")
|
||||
public void testSyntheticAccessors() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/syntheticAccessors/");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelPrivateMembers")
|
||||
public void testTopLevelPrivateMembers() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/topLevelPrivateMembers/");
|
||||
|
||||
Generated
+40
@@ -30,6 +30,11 @@ public class LegacyCompareJvmAbiTestGenerated extends AbstractLegacyCompareJvmAb
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/jvm-abi-gen/testData/compare"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM, false);
|
||||
}
|
||||
|
||||
@TestMetadata("anonymousObjects")
|
||||
public void testAnonymousObjects() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/anonymousObjects/");
|
||||
}
|
||||
|
||||
@TestMetadata("classFlags")
|
||||
public void testClassFlags() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/classFlags/");
|
||||
@@ -50,6 +55,31 @@ public class LegacyCompareJvmAbiTestGenerated extends AbstractLegacyCompareJvmAb
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/constant/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrder")
|
||||
public void testDeclarationOrder() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrder/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInline")
|
||||
public void testDeclarationOrderInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInlineCall")
|
||||
public void testDeclarationOrderInlineCall() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderInlineNonInline")
|
||||
public void testDeclarationOrderInlineNonInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineNonInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationOrderPrivateInline")
|
||||
public void testDeclarationOrderPrivateInline() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/");
|
||||
}
|
||||
|
||||
@TestMetadata("functionBody")
|
||||
public void testFunctionBody() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/functionBody/");
|
||||
@@ -60,6 +90,11 @@ public class LegacyCompareJvmAbiTestGenerated extends AbstractLegacyCompareJvmAb
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/inlineFunctionBody/");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdas")
|
||||
public void testLambdas() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/lambdas/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterName")
|
||||
public void testParameterName() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/parameterName/");
|
||||
@@ -80,6 +115,11 @@ public class LegacyCompareJvmAbiTestGenerated extends AbstractLegacyCompareJvmAb
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/superClass/");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticAccessors")
|
||||
public void testSyntheticAccessors() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/syntheticAccessors/");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelPrivateMembers")
|
||||
public void testTopLevelPrivateMembers() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compare/topLevelPrivateMembers/");
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
private val x = object { fun f() = 1 }
|
||||
|
||||
fun g() = x.f() + object { fun f() = 0 }.f()
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun g() = 1
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
fun f() = 1
|
||||
val x = 2
|
||||
}
|
||||
|
||||
val y = 3
|
||||
fun g() = 4
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
fun g() = 4
|
||||
val y = 3
|
||||
|
||||
class A {
|
||||
val x = 2
|
||||
fun f() = 1
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
inline fun f() = 1
|
||||
inline fun g() = 2
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
inline fun g() = 2
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
// This changes the line numbers in f, g
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
fun g() = f()
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
// IGNORE_BACKEND: JVM, JVM_IR
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
fun g() = f()
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
// This does not change the line numbers in f, but does change the line
|
||||
// numbers in the SourceDebug extension section which has to be rewritten.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
fun g() = 2
|
||||
fun h() = 3
|
||||
+1
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
inline fun f() = 1
|
||||
|
||||
fun h() = 3
|
||||
fun g() = 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
private inline fun f(): Int {
|
||||
return g()
|
||||
}
|
||||
|
||||
private inline fun g() = 1
|
||||
|
||||
fun h() = f()
|
||||
+1
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
|
||||
fun h() = f()
|
||||
|
||||
private inline fun g() = 1
|
||||
|
||||
private inline fun f(): Int {
|
||||
return g()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
private inline fun f() = { 1 }()
|
||||
fun g() = f()
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun g() = 1
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
private val x = 1
|
||||
|
||||
// We don't yet strip out empty top-level classes from the kotlin_module files!
|
||||
val y = 2
|
||||
|
||||
object A { fun f() = x }
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
object A { fun f() = 1 }
|
||||
|
||||
val y = 2
|
||||
Reference in New Issue
Block a user