added tests for 'copy' finally pseudocode part

This commit is contained in:
Svetlana Isakova
2012-12-11 18:29:58 +04:00
parent bd31f36836
commit e72cdbc1f7
3 changed files with 406 additions and 67 deletions
+47
View File
@@ -0,0 +1,47 @@
fun testCopy1() : Int {
try {
doSmth()
}
catch (e: NullPointerException) {
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
return 1
}
}
fun testCopy2() {
while (cond()) {
try {
doSmth()
}
catch (e: NullPointerException) {
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
if (cond()) return
else continue
}
}
}
fun testCopy3() {
try {
doSmth()
}
catch (e: NullPointerException) {
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
while (cond());
}
}