mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-08-02 15:32:15 +00:00
AS3 Fix and/or in try clause
This commit is contained in:
@@ -1150,6 +1150,24 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTryIf() {
|
||||
decompileMethod("classic_air", "testTryIf", "var a:int = Math.random();\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "if(a > 5 && a < 50)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in limits\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"next\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in catch\");\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTryReturn() {
|
||||
decompileMethod("classic_air", "testTryReturn", "var i:int = 0;\r\n"
|
||||
|
||||
@@ -1139,6 +1139,24 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTryIf() {
|
||||
decompileMethod("classic", "testTryIf", "var a:int = Math.random();\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "if(a > 5 && a < 50)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in limits\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"next\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "catch(e:Error)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"in catch\");\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTryReturn() {
|
||||
decompileMethod("classic", "testTryReturn", "var i:int = 0;\r\n"
|
||||
|
||||
Reference in New Issue
Block a user