A test for catch serialization.

This commit is contained in:
Alexander Gorshenev
2017-11-13 14:40:28 +03:00
committed by alexander-gorshenev
parent 0b096e2208
commit 3e0b50ef6b
3 changed files with 23 additions and 0 deletions
+6
View File
@@ -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()
}