mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-23 12:45:12 +00:00
New test classes for fors, updated AS3Generator for tests
This commit is contained in:
@@ -27,12 +27,15 @@ package
|
||||
TestExpressions;
|
||||
TestFinallyZeroJump;
|
||||
TestFor;
|
||||
TestForAnd;
|
||||
TestForBreak;
|
||||
TestForContinue;
|
||||
TestForEach;
|
||||
TestForEachObjectArray;
|
||||
TestForEachObjectAttribute;
|
||||
TestForGoto;
|
||||
TestForIn;
|
||||
TestForXml;
|
||||
TestHello;
|
||||
TestIf;
|
||||
TestIfElse;
|
||||
|
||||
33
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestForAnd.as
vendored
Normal file
33
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestForAnd.as
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package tests
|
||||
{
|
||||
public class TestForAnd
|
||||
{
|
||||
|
||||
|
||||
public function run() : *
|
||||
{
|
||||
var len:int = 5;
|
||||
var x : Boolean;
|
||||
var a:int = 4;
|
||||
var b:int = 7;
|
||||
var c:int = 9;
|
||||
for (var i:uint = 0; i < len; x = a > 4 && b < 2 || c > 10)
|
||||
{
|
||||
c = 1;
|
||||
|
||||
if (c == 2) {
|
||||
trace("A");
|
||||
if (c == 7)
|
||||
{
|
||||
trace("B");
|
||||
continue;
|
||||
}
|
||||
trace("C");
|
||||
}
|
||||
trace("D");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
28
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestForGoto.as
vendored
Normal file
28
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestForGoto.as
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package tests
|
||||
{
|
||||
public class TestForGoto
|
||||
{
|
||||
|
||||
|
||||
public function run() : *
|
||||
{
|
||||
var len:int = 5;
|
||||
for (var i:uint = 0; i < len; ++i)
|
||||
{
|
||||
var c:int = 1;
|
||||
|
||||
if (c == 2)
|
||||
trace("A")
|
||||
else if (c == 3)
|
||||
trace("B")
|
||||
else
|
||||
continue;
|
||||
|
||||
trace("C")
|
||||
|
||||
}
|
||||
trace("exit");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
39
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestForXml.as
vendored
Normal file
39
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestForXml.as
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
package tests
|
||||
{
|
||||
public class TestForXml
|
||||
{
|
||||
|
||||
|
||||
public function run() : *
|
||||
{
|
||||
var name:String = "ahoj";
|
||||
var myXML:XML=<order id="604">
|
||||
<book isbn="12345">
|
||||
<title>{name}</title>
|
||||
</book>
|
||||
</order>;
|
||||
|
||||
var k:* = null;
|
||||
|
||||
var len:int = 5;
|
||||
var a:int = 5;
|
||||
var b:int = 6;
|
||||
|
||||
for (var i:int = 0; i < len; k=myXML.book.(@isbn="12345"))
|
||||
{
|
||||
var c:int = 1;
|
||||
|
||||
if (c == 2)
|
||||
trace("A")
|
||||
else if (c == 3)
|
||||
trace("B")
|
||||
else
|
||||
continue;
|
||||
|
||||
trace("C")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user