diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java index c2690acfc..8d7e22af7 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -209,6 +209,7 @@ public class ActionScript3Test { + "trace(\"new line \\r\\n hello!\");\r\n", false); } + @Test public void testContinueLevels() { decompileMethod("testContinueLevels", "var b:* = undefined;\r\n" + "var c:* = undefined;\r\n" @@ -808,7 +809,7 @@ public class ActionScript3Test { public void testStringConcat() { decompileMethod("testStringConcat", "var k:* = 8;\r\n" + "this.traceIt(\"hello\" + 5 * 6);\r\n" - + "this.traceIt(\"hello\" + (k-1));\r\n" + + "this.traceIt(\"hello\" + (k - 1));\r\n" + "this.traceIt(\"hello\" + 5 + 6);\r\n", false); } @@ -889,6 +890,12 @@ public class ActionScript3Test { + "return 4;\r\n", false); } + @Test + public void testVector2() { + decompileMethod("testVector2", "var a:Vector.> = new Vector.>();\r\n" + + "var b:Vector. = new [10,20,30];\r\n", false); + } + @Test public void testOptionalParameters() { String methodName = "testOptionalParameters"; diff --git a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java index d5bbbf070..6e0cc48c0 100644 --- a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -131,12 +131,11 @@ public class RecompileTest { for (int s = 0; s < abc.script_info.size(); s++) { HilightedTextWriter htw = new HilightedTextWriter(new CodeFormatting(), false); MyEntry en = abc.script_info.get(s).getPacks(abc, s).get(0); - System.out.print("Recompiling:"+en.key.toString()+"..."); + System.out.println("Recompiling:"+en.key.toString()+"..."); en.value.toSource(htw, swf.abcList, abc.script_info.get(s).traits.traits, ScriptExportMode.AS, false); String original = htw.toString(); ABC nabc = new ABC(swf); - com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScriptParser.compile(original, nabc,allAbcs, false, en.key.className + ".as"); - System.out.println("OK"); + com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScriptParser.compile(original, nabc,allAbcs, false, en.key.className + ".as"); } } } else { diff --git a/trunk/testdata/as3/as3.swf b/trunk/testdata/as3/as3.swf index 8b5d03575..a3d4e409c 100644 Binary files a/trunk/testdata/as3/as3.swf and b/trunk/testdata/as3/as3.swf differ diff --git a/trunk/testdata/as3/classes/Test.as b/trunk/testdata/as3/classes/Test.as index 062fcddf7..8a37a3546 100644 --- a/trunk/testdata/as3/classes/Test.as +++ b/trunk/testdata/as3/classes/Test.as @@ -881,5 +881,11 @@ public function testOptionalParameters(p1:Event=null, p2:Number=1, p3:Number=-1, p4:Number=-1.1, p5:Number=-1.1, p6:String="a") { } + + public function testVector2() + { + var a:Vector.> = new Vector.>(); + var b:Vector. = new [10,20,30]; + } } }