diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java
index 002bfd1ae..180de3f0a 100644
--- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java
+++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java
@@ -597,14 +597,13 @@ public class ActionScript3Test extends ActionScriptTestBase {
@Test
public void testGotos() {
- decompileMethod("testGotos", "var _loc2_:Boolean = true;\r\n"
- + "var _loc3_:Boolean = false;\r\n"
- + "var _loc4_:Boolean = false;\r\n"
- + "if(_loc2_)\r\n"
+ decompileMethod("testGotos", "var a:Boolean = true;\r\n"
+ + "var b:Boolean = false;\r\n"
+ + "if(a)\r\n"
+ "{\r\n"
+ "trace(\"A\");\r\n"
+ "}\r\n"
- + "else if(_loc3_)\r\n"
+ + "else if(b)\r\n"
+ "{\r\n"
+ "trace(\"B\");\r\n"
+ "}\r\n"
@@ -612,7 +611,7 @@ public class ActionScript3Test extends ActionScriptTestBase {
+ "{\r\n"
+ "try\r\n"
+ "{\r\n"
- + "if(_loc2_)\r\n"
+ + "if(a)\r\n"
+ "{\r\n"
+ "return 7;\r\n"
+ "}\r\n"
@@ -1164,7 +1163,8 @@ public class ActionScript3Test extends ActionScriptTestBase {
@Test
public void testSwitchComma() {
- decompileMethod("testSwitchComma", "var a:String = \"A\";\r\n"
+ decompileMethod("testSwitchComma", "var b:int = 5;\r\n"
+ + "var a:String = \"A\";\r\n"
+ "switch(a)\r\n"
+ "{\r\n"
+ "case \"A\":\r\n"
@@ -1366,6 +1366,122 @@ public class ActionScript3Test extends ActionScriptTestBase {
false);
}
+ @Test
+ public void testXml() {
+ decompileMethod("testXml", "var g:XML = null;\r\n"
+ + "var name:String = \"ahoj\";\r\n"
+ + "var myXML:XML = \r\n"
+ + "\r\n"
+ + "{name}\r\n"
+ + "\r\n"
+ + ";\r\n"
+ + "var k:* = myXML.@id;\r\n"
+ + "var all:String = myXML.@*.toXMLString();\r\n"
+ + "k = myXML.book;\r\n"
+ + "k = myXML.book.(@isbn = \"12345\");\r\n"
+ + "g = ;\r\n",
+ false);
+ }
+
@Test
public void testOptionalParameters() {
String methodName = "testOptionalParameters";
diff --git a/libsrc/ffdec_lib/testdata/flashdevelop/bin/flashdevelop.swf b/libsrc/ffdec_lib/testdata/flashdevelop/bin/flashdevelop.swf
index 0544aa758..95d9333cd 100644
Binary files a/libsrc/ffdec_lib/testdata/flashdevelop/bin/flashdevelop.swf and b/libsrc/ffdec_lib/testdata/flashdevelop/bin/flashdevelop.swf differ
diff --git a/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.old b/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.old
index 1515dd3c8..c44f2164e 100644
--- a/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.old
+++ b/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.old
@@ -16,7 +16,7 @@
CONFIG::timeStamp
- '23.01.2021'
+ '24.01.2021'
CONFIG::air
diff --git a/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.xml b/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.xml
index 1515dd3c8..c44f2164e 100644
--- a/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.xml
+++ b/libsrc/ffdec_lib/testdata/flashdevelop/obj/flashdevelopConfig.xml
@@ -16,7 +16,7 @@
CONFIG::timeStamp
- '23.01.2021'
+ '24.01.2021'
CONFIG::air
diff --git a/libsrc/ffdec_lib/testdata/flashdevelop/src/Main.as b/libsrc/ffdec_lib/testdata/flashdevelop/src/Main.as
index 582e78714..0d65a2786 100644
--- a/libsrc/ffdec_lib/testdata/flashdevelop/src/Main.as
+++ b/libsrc/ffdec_lib/testdata/flashdevelop/src/Main.as
@@ -77,11 +77,12 @@ package
TestTry;
TestTryReturn;
TestVector;
- TestVector2;
+ TestVector2;
TestWhileAnd;
TestWhileContinue;
TestWhileTry;
TestWhileTry2;
+ TestXml;
SetupMyPackage1;
SetupMyPackage2;
diff --git a/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos.as b/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos.as
index d82cb07a3..857f129b9 100644
--- a/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos.as
+++ b/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos.as
@@ -6,15 +6,14 @@ package tests
public final function run(param1:Object):int
{
- var _loc2_:Boolean = true;
- var _loc3_:Boolean = false;
- var _loc4_:Boolean = false;
+ var a:Boolean = true;
+ var b:Boolean = false;
- if (_loc2_)
+ if (a)
{
trace("A");
}
- else if (_loc3_)
+ else if (b)
{
trace("B");
@@ -23,7 +22,7 @@ package tests
{
try
{
- if (_loc2_)
+ if (a)
{
return 7;
}
diff --git a/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestXml.as b/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestXml.as
new file mode 100644
index 000000000..1cf81f82e
--- /dev/null
+++ b/libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestXml.as
@@ -0,0 +1,25 @@
+package tests
+{
+ public class TestXml
+ {
+
+ public function run() : void
+ {
+ var name:String="ahoj";
+ var myXML:XML=
+
+ {name}
+
+ ;
+
+ var k:*=myXML.@id;
+ var all:String=myXML.@*.toXMLString();
+ k=myXML.book;
+ k=myXML.book.(@isbn="12345");
+
+ var g:XML=new XML("");
+ }
+
+ }
+
+}
\ No newline at end of file