Check the RequireKotlin annotation value

Similarly to SinceKotlin
This commit is contained in:
Alexander Udalov
2017-10-09 20:48:38 +02:00
parent a96861c353
commit 6f2e6db131
16 changed files with 238 additions and 95 deletions
@@ -1072,6 +1072,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("illegalRequireKotlinValue.kt")
public void testIllegalRequireKotlinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.kt");
doTest(fileName);
}
@TestMetadata("illegalSinceKotlinValue.kt")
public void testIllegalSinceKotlinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalSinceKotlinValue.kt");
@@ -1072,6 +1072,12 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
doTest(fileName);
}
@TestMetadata("illegalRequireKotlinValue.kt")
public void testIllegalRequireKotlinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.kt");
doTest(fileName);
}
@TestMetadata("illegalSinceKotlinValue.kt")
public void testIllegalSinceKotlinValue() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalSinceKotlinValue.kt");
@@ -129,4 +129,14 @@ class VersionRequirementTest : TestCaseWithTmpdir() {
"test.property"
)
}
fun testCompilerVersionViaAnnotation() {
doTest(VersionRequirement.Version(1, 1), DeprecationLevel.WARNING, "message", ProtoBuf.VersionRequirement.VersionKind.COMPILER_VERSION, 42,
"test.Klass",
"test.Konstructor.<init>",
"test.Typealias",
"test.function",
"test.property"
)
}
}