mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-23 07:25:35 +00:00
fixed some dup problems
This commit is contained in:
@@ -1573,6 +1573,19 @@ public class ActionScript3Test extends ActionScriptTestBase {
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssembledDoubleDup() {
|
||||
decompileMethod("assembled", "testDoubleDup", "var _loc10_:Rectangle = myprop(_loc5_);\r\n"
|
||||
+ "_loc10_.mymethod(-_loc10_.width,-_loc10_.height);\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssembledDup() {
|
||||
decompileMethod("assembled", "testDup", "return 1 - (var _loc1_:Number = 1 - _loc1_ / _loc4_) * _loc1_;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssembledDupAssignment() {
|
||||
decompileMethod("assembled", "testDupAssignment", "var _loc1_:int = 0;\r\n"
|
||||
@@ -1625,6 +1638,12 @@ public class ActionScript3Test extends ActionScriptTestBase {
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssembledIncrement3() {
|
||||
decompileMethod("assembled", "testIncrement3", "_loc1_.length--;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssembledSetSlotDup() {
|
||||
decompileMethod("assembled", "testSetSlotDup", "var _loc5_:int = 5;\r\n"
|
||||
@@ -1633,6 +1652,12 @@ public class ActionScript3Test extends ActionScriptTestBase {
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssembledSetSlotFindProperty() {
|
||||
decompileMethod("assembled", "testSetSlotFindProperty", "return var myprop:int = 50;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOptionalParameters() {
|
||||
String methodName = "testOptionalParameters";
|
||||
|
||||
@@ -38,6 +38,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -120,7 +121,7 @@ public class AS3Generator {
|
||||
useFile(s, new File("testdata/flashdevelop/bin/flashdevelop.swf"), "standard");
|
||||
useFile(s, new File("testdata/custom/bin/custom.swf"), "assembled");
|
||||
|
||||
try (PrintWriter pw = new PrintWriter("as3_teststub.java")) {
|
||||
try (PrintWriter pw = new PrintWriter("as3_teststub.java", Charset.forName("UTF-8"))) {
|
||||
pw.println(s.toString());
|
||||
}
|
||||
System.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user