[LC] add test on Throws annotation
This commit is contained in:
committed by
Space Team
parent
5a74fec3ac
commit
0e23ffcec9
+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()
|
||||
}
|
||||
Reference in New Issue
Block a user