A test for catch serialization.
This commit is contained in:
committed by
alexander-gorshenev
parent
0b096e2208
commit
3e0b50ef6b
@@ -2047,6 +2047,12 @@ task deserialized_members(type: LinkKonanTest) {
|
||||
source = "serialization/deserialize_members.kt"
|
||||
}
|
||||
|
||||
task serialized_catch(type: LinkKonanTest) {
|
||||
source = "serialization/use.kt"
|
||||
lib = "serialization/catch.kt"
|
||||
goldValue = "Gotcha1: XXX\nGotcha2: YYY\n"
|
||||
}
|
||||
|
||||
task testing_annotations(type: RunStandaloneKonanTest) {
|
||||
source = "testing/annotations.kt"
|
||||
flags = ['-tr']
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
inline fun foo() {
|
||||
try {
|
||||
try {
|
||||
throw Exception("XXX")
|
||||
} catch (e: Throwable) {
|
||||
println("Gotcha1: ${e.message}")
|
||||
throw Exception("YYY")
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
println("Gotcha2: ${e.message}")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo()
|
||||
}
|
||||
Reference in New Issue
Block a user