mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-25 00:16:02 +00:00
Fixed: #2226 Incorrect decompilation of continue statements in some cases
This commit is contained in:
@@ -2226,6 +2226,36 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWhileSwitch() {
|
||||
decompileMethod("classic_air", "testWhileSwitch", "var a:Boolean = true;\r\n"
|
||||
+ "var d:int = 5;\r\n"
|
||||
+ "var e:Boolean = true;\r\n"
|
||||
+ "var i:int = 0;\r\n"
|
||||
+ "while(i < 100)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"start\");\r\n"
|
||||
+ "if(a)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"A\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "else\r\n"
|
||||
+ "{\r\n"
|
||||
+ "switch(d - 1)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "case 0:\r\n"
|
||||
+ "trace(\"D1\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n"
|
||||
+ "if(e)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"E\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "i++;\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWhileTry() {
|
||||
decompileMethod("classic_air", "testWhileTry", "while(true)\r\n"
|
||||
|
||||
@@ -2219,6 +2219,36 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWhileSwitch() {
|
||||
decompileMethod("classic", "testWhileSwitch", "var a:Boolean = true;\r\n"
|
||||
+ "var d:int = 5;\r\n"
|
||||
+ "var e:Boolean = true;\r\n"
|
||||
+ "var i:int = 0;\r\n"
|
||||
+ "while(i < 100)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"start\");\r\n"
|
||||
+ "if(a)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"A\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "else\r\n"
|
||||
+ "{\r\n"
|
||||
+ "switch(d)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "case 1:\r\n"
|
||||
+ "trace(\"D1\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "}\r\n"
|
||||
+ "if(e)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"E\");\r\n"
|
||||
+ "}\r\n"
|
||||
+ "i++;\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWhileTry() {
|
||||
decompileMethod("classic", "testWhileTry", "while(true)\r\n"
|
||||
|
||||
Reference in New Issue
Block a user