mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-08-02 15:32:15 +00:00
Fixed: AS decompilation - certain combinations of ifs and switch
This commit is contained in:
@@ -190,6 +190,34 @@ public class ActionScript3AssembledDecompileTest extends ActionScript3DecompileT
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSwitchGoto() {
|
||||
decompileMethod("assembled", "testSwitchGoto", "var i:int = 5;\r\n"
|
||||
+ "var a:Boolean = true;\r\n"
|
||||
+ "var b:Boolean = false;\r\n"
|
||||
+ "switch(i)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "case 0:\r\n"
|
||||
+ "trace(\"case0\");\r\n"
|
||||
+ "break;\r\n"
|
||||
+ "case 1:\r\n"
|
||||
+ "if(a)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "if(b)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"a\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "break;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"b\");\r\n"
|
||||
+ "trace(\"c\");\r\n"
|
||||
+ "break;\r\n"
|
||||
+ "case 2:\r\n"
|
||||
+ "trace(\"case2\");\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSwitchJoin() {
|
||||
decompileMethod("assembled", "testSwitchJoin", "trace(\"before\");\r\n"
|
||||
|
||||
Reference in New Issue
Block a user