[FIR TEST] Add failing BB test with Deprecated annotation
This commit is contained in:
+18
@@ -1690,6 +1690,24 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/firProblems")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class FirProblems extends AbstractFir2IrTextTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.ANY, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFirProblems() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/firProblems"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("deprecated.kt")
|
||||
public void testDeprecated() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/firProblems/deprecated.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/lambdas")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
FILE fqName:<root> fileName:/deprecated.kt
|
||||
FUN name:create visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun create (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
FUN name:create visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.String
|
||||
annotations:
|
||||
Deprecated(message = 'Use create() instead()', replaceWith = ReplaceWith(expression = 'create()', imports = <null>), level = <null>)
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun create (s: kotlin.String): kotlin.String declared in <root>'
|
||||
CALL 'public final fun create (): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
FUN name:create visibility:public modality:FINAL <> (b:kotlin.Boolean) returnType:kotlin.String
|
||||
annotations:
|
||||
Deprecated(message = 'Use create() instead()', replaceWith = <null>, level = <null>)
|
||||
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun create (b: kotlin.Boolean): kotlin.String declared in <root>'
|
||||
CALL 'public final fun create (): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun create() = "OK"
|
||||
|
||||
@Deprecated("Use create() instead()", replaceWith = ReplaceWith("create()"))
|
||||
fun create(s: String) = create()
|
||||
|
||||
@Deprecated("Use create() instead()")
|
||||
fun create(b: Boolean) = create()
|
||||
@@ -0,0 +1,19 @@
|
||||
FILE fqName:<root> fileName:/deprecated.kt
|
||||
FUN name:create visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun create (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
FUN name:create visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.String
|
||||
annotations:
|
||||
Deprecated(message = 'Use create() instead()', replaceWith = ReplaceWith(expression = 'create()', imports = []), level = <null>)
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun create (s: kotlin.String): kotlin.String declared in <root>'
|
||||
CALL 'public final fun create (): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
FUN name:create visibility:public modality:FINAL <> (b:kotlin.Boolean) returnType:kotlin.String
|
||||
annotations:
|
||||
Deprecated(message = 'Use create() instead()', replaceWith = <null>, level = <null>)
|
||||
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun create (b: kotlin.Boolean): kotlin.String declared in <root>'
|
||||
CALL 'public final fun create (): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
@@ -1689,6 +1689,24 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/firProblems")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class FirProblems extends AbstractIrTextTestCase {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFirProblems() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/firProblems"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("deprecated.kt")
|
||||
public void testDeprecated() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/firProblems/deprecated.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/ir/irText/lambdas")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user