Put $assertionDisabled field into inline-site's class
The generated code is more inline with java, and we avoid the error of accessing package-private field outside of the package. However, this changes semantics a bit. Now, a user should set assertion status of inline-site's package, instead of inline function's one. #KT-28317: Fixed
This commit is contained in:
+20
@@ -640,10 +640,30 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCompanion.kt")
|
||||
public void testJvmCompanion() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambda.kt")
|
||||
public void testJvmCrossinlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambda2.kt")
|
||||
public void testJvmCrossinlineLambda2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt")
|
||||
public void testJvmCrossinlineLambdaDeclarationSite() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmDoubleInline.kt")
|
||||
public void testJvmDoubleInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/builders")
|
||||
|
||||
@@ -402,6 +402,39 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/assert")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Assert extends AbstractBytecodeTextTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAssert() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/assert"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinline.kt")
|
||||
public void testJvmCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineAssertInLambda.kt")
|
||||
public void testJvmCrossinlineAssertInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmCrossinlineAssertInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmInline.kt")
|
||||
public void testJvmInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmInline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmInlineLambda.kt")
|
||||
public void testJvmInlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/boxing")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+20
@@ -640,10 +640,30 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCompanion.kt")
|
||||
public void testJvmCompanion() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambda.kt")
|
||||
public void testJvmCrossinlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambda2.kt")
|
||||
public void testJvmCrossinlineLambda2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt")
|
||||
public void testJvmCrossinlineLambdaDeclarationSite() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmDoubleInline.kt")
|
||||
public void testJvmDoubleInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/builders")
|
||||
|
||||
+20
@@ -640,10 +640,30 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCompanion.kt")
|
||||
public void testJvmCompanion() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambda.kt")
|
||||
public void testJvmCrossinlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambda2.kt")
|
||||
public void testJvmCrossinlineLambda2() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt")
|
||||
public void testJvmCrossinlineLambdaDeclarationSite() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmDoubleInline.kt")
|
||||
public void testJvmDoubleInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/builders")
|
||||
|
||||
+33
@@ -402,6 +402,39 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/assert")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Assert extends AbstractIrBytecodeTextTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAssert() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/assert"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinline.kt")
|
||||
public void testJvmCrossinline() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmCrossinline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmCrossinlineAssertInLambda.kt")
|
||||
public void testJvmCrossinlineAssertInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmCrossinlineAssertInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmInline.kt")
|
||||
public void testJvmInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmInline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmInlineLambda.kt")
|
||||
public void testJvmInlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/boxing")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user