[LC] add test on Throws annotation
This commit is contained in:
committed by
Space Team
parent
5a74fec3ac
commit
0e23ffcec9
+6
@@ -258,6 +258,12 @@ public class SymbolLightClassesByFqNameForLibraryTestGenerated extends AbstractS
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/StubOrderForOverloads.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Throws.kt")
|
||||
public void testThrows() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/Throws.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("TypePararametersInClass.kt")
|
||||
public void testTypePararametersInClass() throws Exception {
|
||||
|
||||
+6
@@ -258,6 +258,12 @@ public class SymbolLightClassesParentingForLibraryTestGenerated extends Abstract
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/StubOrderForOverloads.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Throws.kt")
|
||||
public void testThrows() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/Throws.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("TypePararametersInClass.kt")
|
||||
public void testTypePararametersInClass() throws Exception {
|
||||
|
||||
+6
@@ -258,6 +258,12 @@ public class SymbolLightClassesByFqNameForSourceTestGenerated extends AbstractSy
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/StubOrderForOverloads.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Throws.kt")
|
||||
public void testThrows() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/Throws.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("TypePararametersInClass.kt")
|
||||
public void testTypePararametersInClass() throws Exception {
|
||||
|
||||
+6
@@ -258,6 +258,12 @@ public class SymbolLightClassesParentingForSourceTestGenerated extends AbstractS
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/StubOrderForOverloads.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Throws.kt")
|
||||
public void testThrows() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/Throws.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("TypePararametersInClass.kt")
|
||||
public void testTypePararametersInClass() throws Exception {
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
public final class Test /* Test*/ extends Base {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String boo;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String foo;
|
||||
|
||||
private final int p1;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getBoo() throws MyException;// getBoo()
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getFoo() throws MyException;// getFoo()
|
||||
|
||||
public Test(int) throws MyException;// .ctor(int)
|
||||
|
||||
public final void readSomething() throws MyException;// readSomething()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
public final class Test /* Test*/ extends Base {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String boo = "42" /* initializer type: java.lang.String */;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String foo = "42" /* initializer type: java.lang.String */;
|
||||
|
||||
private final int p1;
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getBoo() throws MyException;// getBoo()
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getFoo() throws MyException;// getFoo()
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
public Test(int) throws MyException;// .ctor(int)
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
public final void readSomething() throws MyException;// readSomething()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
public final class Test /* Test*/ extends Base {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String boo;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String foo;
|
||||
|
||||
private final int p1;
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getBoo() throws MyException;// getBoo()
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getFoo() throws MyException;// getFoo()
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
public Test(int) throws MyException;// .ctor(int)
|
||||
|
||||
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
|
||||
public final void readSomething() throws MyException;// readSomething()
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Test
|
||||
// WITH_STDLIB
|
||||
|
||||
abstract class Base
|
||||
|
||||
class MyException : Exception()
|
||||
|
||||
class Test
|
||||
@Throws(MyException::class)
|
||||
constructor(
|
||||
private val p1: Int
|
||||
) : Base() {
|
||||
@Throws(MyException::class)
|
||||
fun readSomething() {
|
||||
throw MyException()
|
||||
}
|
||||
|
||||
@get:Throws(MyException::class)
|
||||
val foo : String = "42"
|
||||
|
||||
val boo : String = "42"
|
||||
@Throws(MyException::class)
|
||||
get
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
public final class Test /* Test*/ extends Base {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String boo;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String foo;
|
||||
|
||||
private final int p1;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getBoo() throws MyException;// getBoo()
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getFoo() throws MyException;// getFoo()
|
||||
|
||||
public Test(int) throws MyException;// .ctor(int)
|
||||
|
||||
public final void readSomething() throws MyException;// readSomething()
|
||||
}
|
||||
+5
@@ -224,6 +224,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/StubOrderForOverloads.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Throws.kt")
|
||||
public void testThrows() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/Throws.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypePararametersInClass.kt")
|
||||
public void testTypePararametersInClass() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/TypePararametersInClass.kt");
|
||||
|
||||
Reference in New Issue
Block a user