tests: Test net.getClassByAlias

This commit is contained in:
Tom Schuster 2024-01-21 17:06:09 +01:00
parent ab99eb3e09
commit 7e40abe0f0
4 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,26 @@
package {
import flash.display.Sprite;
public class Test extends Sprite {
public function Test() { }
}
}
import flash.net.*;
try {
getClassByAlias("toString");
} catch (e) {
trace(e);
}
try {
getClassByAlias("MyClass");
} catch (e) {
trace(e);
}
final class TestClass {
};
registerClassAlias("MyClass", TestClass);
trace(getClassByAlias("MyClass"));

View File

@ -0,0 +1,3 @@
ReferenceError: Error #1014: Class toString could not be found.
ReferenceError: Error #1014: Class MyClass could not be found.
[class TestClass]

Binary file not shown.

View File

@ -0,0 +1 @@
num_frames = 1