updated tests

This commit is contained in:
Jindra Petk
2013-08-11 22:47:03 +02:00
parent b6b6b88f00
commit d180c42628

View File

@@ -362,7 +362,8 @@ public class ActionScript3Test {
+ "finally\r\n"
+ "{\r\n"
+ "trace(\"Finally part\");\r\n"
+ "}\r\n", false);
+ "}\r\n"
+ "trace(\"end\");\r\n", false);
}
@Test
@@ -565,9 +566,9 @@ public class ActionScript3Test {
+ "trace(\"hi \");\r\n"
+ "if(5 == 4)\r\n"
+ "{\r\n"
+ "return _loc5_;\r\n"
+ "return str;\r\n"
+ "}\r\n"
+ "return _loc5_;\r\n"
+ "return \"hu\" + str;\r\n"
+ "}\r\n", false);
}
@@ -817,4 +818,31 @@ public class ActionScript3Test {
+ "}\r\n"
+ "trace(\"end\");\r\n", false);
}
@Test
public void testTryReturn() {
decompileMethod("testTryReturn", "var i:int = 0;\r\n"
+ "var b:Boolean = false;\r\n"
+ "try\r\n"
+ "{\r\n"
+ "i = 0;\r\n"
+ "b = true;\r\n"
+ "if(i > 0)\r\n"
+ "{\r\n"
+ "while(this.testDoWhile2())\r\n"
+ "{\r\n"
+ "if(b)\r\n"
+ "{\r\n"
+ "return 5;\r\n"
+ "}\r\n"
+ "}\r\n"
+ "}\r\n"
+ "i++;\r\n"
+ "return 2;\r\n"
+ "}\r\n"
+ "catch(e:Error)\r\n"
+ "{\r\n"
+ "}\r\n"
+ "return 4;\r\n", false);
}
}