tests: Add test for DefineLocal and issue #760
This commit is contained in:
parent
52fbb77e99
commit
8da0f43412
|
@ -208,6 +208,7 @@ swf_tests! {
|
||||||
#[ignore] (edittext_newlines, "avm1/edittext_newlines", 1),
|
#[ignore] (edittext_newlines, "avm1/edittext_newlines", 1),
|
||||||
(edittext_html_entity, "avm1/edittext_html_entity", 1),
|
(edittext_html_entity, "avm1/edittext_html_entity", 1),
|
||||||
#[ignore] (edittext_html_roundtrip, "avm1/edittext_html_roundtrip", 1),
|
#[ignore] (edittext_html_roundtrip, "avm1/edittext_html_roundtrip", 1),
|
||||||
|
(define_local, "avm1/define_local", 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: These tests have some inaccuracies currently, so we use approx_eq to test that numeric values are close enough.
|
// TODO: These tests have some inaccuracies currently, so we use approx_eq to test that numeric values are close enough.
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
DefineLocal runs virtual setter:
|
||||||
|
set prop1
|
||||||
|
get prop1
|
||||||
|
prop1: prop1
|
||||||
|
|
||||||
|
DefineLocal overwrites prototype non-virtual property:
|
||||||
|
prop2: 10
|
||||||
|
|
||||||
|
DefineLocal runs prototype virtual setter:
|
||||||
|
set prop3
|
||||||
|
get prop3
|
||||||
|
prop3: prop3
|
||||||
|
|
||||||
|
DefineLocal2 already defined:
|
||||||
|
prop4: prop4
|
||||||
|
|
||||||
|
DefineLocal2 already defined on prototype:
|
||||||
|
prop5: prop5
|
||||||
|
|
||||||
|
DefineLocal2 not already defined:
|
||||||
|
prop6: undefined
|
||||||
|
hasOwnProperty('prop6'): true
|
||||||
|
|
||||||
|
Inside function
|
||||||
|
|
||||||
|
prop1: func1
|
||||||
|
prop3: undefined
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue