mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-23 06:35:33 +00:00
Fixed: #2322 More AS3 Assigment position when using dup
This commit is contained in:
@@ -1708,6 +1708,20 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOptimizationWhile() {
|
||||
decompileMethod("classic_air", "testOptimizationWhile", "var a:int = 1;\r\n"
|
||||
+ "var b:int = 2;\r\n"
|
||||
+ "var c:int = 3;\r\n"
|
||||
+ "var d:int = 4;\r\n"
|
||||
+ "while(d = Math.round(Math.random() * 10), d < 10)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"xxx\");\r\n"
|
||||
+ "d++;\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParamNames() {
|
||||
decompileMethod("classic_air", "testParamNames", "return firstp + secondp + thirdp;\r\n",
|
||||
|
||||
@@ -1694,6 +1694,25 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOptimizationWhile() {
|
||||
decompileMethod("classic", "testOptimizationWhile", "var a:int = 1;\r\n"
|
||||
+ "var b:int = 2;\r\n"
|
||||
+ "var c:int = 3;\r\n"
|
||||
+ "var d:int = 4;\r\n"
|
||||
+ "while(true)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "d = Math.round(Math.random() * 10);\r\n"
|
||||
+ "if(d >= 10)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "break;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "trace(\"xxx\");\r\n"
|
||||
+ "d++;\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParamNames() {
|
||||
decompileMethod("classic", "testParamNames", "return firstp + secondp + thirdp;\r\n",
|
||||
|
||||
Reference in New Issue
Block a user