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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user