mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-30 19:27:38 +00:00
AS3 test methods separated to classes, Fixed AS3: get/set slot for global scope
This commit is contained in:
17
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/SetupMyPackage1.as
vendored
Normal file
17
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/SetupMyPackage1.as
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
package tests_classes.mypackage1
|
||||
{
|
||||
public class SetupMyPackage1
|
||||
{
|
||||
myNamespace;
|
||||
TestClass;
|
||||
TestClass2;
|
||||
TestInterface;
|
||||
|
||||
public function SetupMyPackage1()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
27
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/TestClass.as
vendored
Normal file
27
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/TestClass.as
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package tests_classes.mypackage1
|
||||
{
|
||||
import tests_classes.mypackage2.TestClass;
|
||||
|
||||
public class TestClass implements tests_classes.mypackage1.TestInterface
|
||||
{
|
||||
public function testCall() : String
|
||||
{
|
||||
trace("pkg1hello");
|
||||
return "pkg1hello";
|
||||
}
|
||||
|
||||
public function testMethod1() : void {
|
||||
var a : tests_classes.mypackage1.TestInterface = this;
|
||||
a.testMethod1();
|
||||
var b : tests_classes.mypackage2.TestInterface = this;
|
||||
b = new tests_classes.mypackage2.TestClass();
|
||||
}
|
||||
|
||||
public function testMethod2() : void {
|
||||
var a : tests_classes.mypackage1.TestInterface = this;
|
||||
a.testMethod1();
|
||||
var b : tests_classes.mypackage2.TestInterface = this;
|
||||
b = new tests_classes.mypackage2.TestClass();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/TestClass2.as
vendored
Normal file
36
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/TestClass2.as
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
package tests_classes.mypackage1
|
||||
{
|
||||
import tests_classes.mypackage2.TestClass;
|
||||
import tests_classes.mypackage3.TestClass;
|
||||
|
||||
public class TestClass2
|
||||
{
|
||||
public function testCall() : String
|
||||
{
|
||||
var a : tests_classes.mypackage1.TestClass;
|
||||
a = new tests_classes.mypackage1.TestClass();
|
||||
var b : tests_classes.mypackage2.TestClass;
|
||||
b = new tests_classes.mypackage2.TestClass();
|
||||
var c : tests_classes.mypackage3.TestClass;
|
||||
c = new tests_classes.mypackage3.TestClass();
|
||||
var res:String = a.testCall() + b.testCall() + c.testCall() + testCall2() + myNamespace::testCall3();
|
||||
trace(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
myNamespace function testCall2() : String
|
||||
{
|
||||
return "1";
|
||||
}
|
||||
|
||||
myNamespace function testCall3() : String
|
||||
{
|
||||
return myNamespace::testCall2();
|
||||
}
|
||||
|
||||
public function testCall2() : String
|
||||
{
|
||||
return "2";
|
||||
}
|
||||
}
|
||||
}
|
||||
9
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/TestInterface.as
vendored
Normal file
9
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/TestInterface.as
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package tests_classes.mypackage1
|
||||
{
|
||||
import tests_classes.mypackage2.TestInterface;
|
||||
|
||||
public interface TestInterface extends tests_classes.mypackage2.TestInterface
|
||||
{
|
||||
function testMethod1() : void;
|
||||
}
|
||||
}
|
||||
4
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/myNamespace.as
vendored
Normal file
4
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage1/myNamespace.as
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
package tests_classes.mypackage1
|
||||
{
|
||||
public namespace myNamespace = "https://www.free-decompiler.com/flash/test/namespace";
|
||||
}
|
||||
15
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage2/SetupMyPackage2.as
vendored
Normal file
15
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage2/SetupMyPackage2.as
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package tests_classes.mypackage2
|
||||
{
|
||||
public class SetupMyPackage2
|
||||
{
|
||||
TestClass;
|
||||
TestInterface;
|
||||
|
||||
public function SetupMyPackage2()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
15
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage2/TestClass.as
vendored
Normal file
15
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage2/TestClass.as
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package tests_classes.mypackage2
|
||||
{
|
||||
|
||||
public class TestClass implements TestInterface
|
||||
{
|
||||
public function testCall() : String
|
||||
{
|
||||
trace("pkg2hello");
|
||||
return "pkg2hello";
|
||||
}
|
||||
|
||||
public function testMethod2() : void {
|
||||
}
|
||||
}
|
||||
}
|
||||
7
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage2/TestInterface.as
vendored
Normal file
7
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage2/TestInterface.as
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package tests_classes.mypackage2
|
||||
{
|
||||
public interface TestInterface
|
||||
{
|
||||
function testMethod2() : void;
|
||||
}
|
||||
}
|
||||
15
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage3/SetupMyPackage3.as
vendored
Normal file
15
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage3/SetupMyPackage3.as
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package tests_classes.mypackage3
|
||||
{
|
||||
public class SetupMyPackage3
|
||||
{
|
||||
TestClass;
|
||||
TestInterface;
|
||||
|
||||
public function SetupMyPackage3()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage3/TestClass.as
vendored
Normal file
12
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage3/TestClass.as
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package tests_classes.mypackage3
|
||||
{
|
||||
|
||||
public class TestClass
|
||||
{
|
||||
public function testCall() : String
|
||||
{
|
||||
trace("pkg3hello");
|
||||
return "pkg3hello";
|
||||
}
|
||||
}
|
||||
}
|
||||
7
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage3/TestInterface.as
vendored
Normal file
7
libsrc/ffdec_lib/testdata/flashdevelop/src/tests_classes/mypackage3/TestInterface.as
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package tests_classes.mypackage3
|
||||
{
|
||||
public interface TestInterface
|
||||
{
|
||||
function testMethod3() : void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user