tests: Add (currently failing) test for init order when combined with register_class
This commit is contained in:
parent
d0fd26a89c
commit
6316d7e0b3
|
@ -129,6 +129,7 @@ swf_tests! {
|
||||||
(equals2_swf6, "avm1/equals2_swf6", 1),
|
(equals2_swf6, "avm1/equals2_swf6", 1),
|
||||||
(equals2_swf7, "avm1/equals2_swf7", 1),
|
(equals2_swf7, "avm1/equals2_swf7", 1),
|
||||||
(register_class, "avm1/register_class", 1),
|
(register_class, "avm1/register_class", 1),
|
||||||
|
(register_and_init_order, "avm1/register_and_init_order", 1),
|
||||||
(set_variable_scope, "avm1/set_variable_scope", 1),
|
(set_variable_scope, "avm1/set_variable_scope", 1),
|
||||||
(slash_syntax, "avm1/slash_syntax", 2),
|
(slash_syntax, "avm1/slash_syntax", 2),
|
||||||
(strictequals_swf6, "avm1/strictequals_swf6", 1),
|
(strictequals_swf6, "avm1/strictequals_swf6", 1),
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
class aaclass extends MovieClip {
|
||||||
|
function aaclass() {
|
||||||
|
trace("aaclass constructor");
|
||||||
|
super();
|
||||||
|
|
||||||
|
trace("");
|
||||||
|
trace("// trace(this._name)");
|
||||||
|
trace(this._name);
|
||||||
|
trace("");
|
||||||
|
|
||||||
|
this.test();
|
||||||
|
trace("aaclass constructor end");
|
||||||
|
trace("");
|
||||||
|
trace("");
|
||||||
|
}
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
trace("aaclass test()");
|
||||||
|
|
||||||
|
trace("");
|
||||||
|
|
||||||
|
trace("// trace(this._name)");
|
||||||
|
trace(this["_name"]);
|
||||||
|
trace("");
|
||||||
|
|
||||||
|
trace("// trace(this.box)");
|
||||||
|
trace(this["box"]);
|
||||||
|
trace("");
|
||||||
|
|
||||||
|
trace("aaclass test() end");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,156 @@
|
||||||
|
b #initclip
|
||||||
|
b #endinitclip
|
||||||
|
|
||||||
|
|
||||||
|
aa #initclip
|
||||||
|
aa #endinitclip
|
||||||
|
|
||||||
|
|
||||||
|
a #initclip
|
||||||
|
a #endinitclip
|
||||||
|
|
||||||
|
|
||||||
|
c #initclip
|
||||||
|
c #endinitclip
|
||||||
|
|
||||||
|
|
||||||
|
a constructor()
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
a
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
a
|
||||||
|
|
||||||
|
// trace(this.box)
|
||||||
|
_level0.a.box
|
||||||
|
|
||||||
|
// trace(this.custom)
|
||||||
|
true
|
||||||
|
|
||||||
|
// trace(this.box.custom)
|
||||||
|
undefined
|
||||||
|
|
||||||
|
// trace(this.box.box)
|
||||||
|
_level0.a.box.box
|
||||||
|
|
||||||
|
a constructor() end
|
||||||
|
|
||||||
|
|
||||||
|
aaclass constructor
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
box
|
||||||
|
|
||||||
|
aaclass test()
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
box
|
||||||
|
|
||||||
|
// trace(this.box)
|
||||||
|
_level0.a.box.box
|
||||||
|
|
||||||
|
aaclass test() end
|
||||||
|
aaclass constructor end
|
||||||
|
|
||||||
|
|
||||||
|
b constructor()
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
b
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
b
|
||||||
|
|
||||||
|
// trace(this.box)
|
||||||
|
_level0.b.box
|
||||||
|
|
||||||
|
// trace(this.custom)
|
||||||
|
true
|
||||||
|
|
||||||
|
b constructor() end
|
||||||
|
|
||||||
|
|
||||||
|
root first frame
|
||||||
|
|
||||||
|
// trace(a._name)
|
||||||
|
a
|
||||||
|
|
||||||
|
// trace(a.box)
|
||||||
|
_level0.a.box
|
||||||
|
|
||||||
|
// trace(a.custom)
|
||||||
|
true
|
||||||
|
|
||||||
|
// trace(a.box.box)
|
||||||
|
_level0.a.box.box
|
||||||
|
|
||||||
|
// trace(a.box.custom)
|
||||||
|
undefined
|
||||||
|
|
||||||
|
// trace(b._name)
|
||||||
|
b
|
||||||
|
|
||||||
|
// trace(b.custom)
|
||||||
|
true
|
||||||
|
|
||||||
|
// trace(b.box)
|
||||||
|
_level0.b.box
|
||||||
|
|
||||||
|
root first frame end
|
||||||
|
|
||||||
|
|
||||||
|
a first frame
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
a
|
||||||
|
|
||||||
|
// trace(this.box)
|
||||||
|
_level0.a.box
|
||||||
|
|
||||||
|
// trace(this.custom)
|
||||||
|
true
|
||||||
|
|
||||||
|
// trace(this.box.custom)
|
||||||
|
undefined
|
||||||
|
|
||||||
|
// trace(this.box.box)
|
||||||
|
_level0.a.box.box
|
||||||
|
|
||||||
|
// trace(this.oldbox)
|
||||||
|
_level0.a.box
|
||||||
|
|
||||||
|
// trace(this.box === this.oldbox)
|
||||||
|
true
|
||||||
|
|
||||||
|
a first frame end
|
||||||
|
|
||||||
|
|
||||||
|
aa first frame
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
box
|
||||||
|
|
||||||
|
// trace(this.box)
|
||||||
|
_level0.a.box.box
|
||||||
|
|
||||||
|
// trace(this.custom)
|
||||||
|
undefined
|
||||||
|
|
||||||
|
aa first frame end
|
||||||
|
|
||||||
|
|
||||||
|
b first frame
|
||||||
|
|
||||||
|
// trace(this._name)
|
||||||
|
b
|
||||||
|
|
||||||
|
// trace(this.box)
|
||||||
|
_level0.b.box
|
||||||
|
|
||||||
|
// trace(this.custom)
|
||||||
|
true
|
||||||
|
|
||||||
|
b first frame end
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue