Add a test for `Function.call` and `Function.apply`

This commit is contained in:
David Wendt 2019-10-20 19:06:29 -04:00
parent 2c0d892154
commit 0470b8d0a7
4 changed files with 45 additions and 0 deletions

View File

@ -130,6 +130,7 @@ swf_tests! {
#[ignore] (xml_inspect_xmldecl, "avm1/xml_inspect_xmldecl", 1), #[ignore] (xml_inspect_xmldecl, "avm1/xml_inspect_xmldecl", 1),
(xml_inspect_createmethods, "avm1/xml_inspect_createmethods", 1), (xml_inspect_createmethods, "avm1/xml_inspect_createmethods", 1),
(xml_inspect_parsexml, "avm1/xml_inspect_parsexml", 1), (xml_inspect_parsexml, "avm1/xml_inspect_parsexml", 1),
(funky_function_calls, "avm1/funky_function_calls", 1),
} }
#[test] #[test]

View File

@ -0,0 +1,44 @@
_level0.childinst
Is it the global object: false
Argument 0: Natural function call
Argument 1: undefined
[type Object]
Is it the global object: true
Argument 0: Apply w/ Undefined
Argument 1: undefined
[type Object]
Is it the global object: true
Argument 0: Apply w/ Global
Argument 1: 3
_level0
Is it the global object: false
Argument 0: Apply w/ Parent
Argument 1: undefined
_level0
Is it the global object: false
Argument 0: Apply w/ Root
Argument 1: undefined
[type Object]
Is it the global object: true
Argument 0: Call w/ Undefined
Argument 1: undefined
[type Object]
Is it the global object: true
Argument 0: Call w/ Global
Argument 1: undefined
_level0
Is it the global object: false
Argument 0: Call w/ Parent
Argument 1: undefined
_level0
Is it the global object: false
Argument 0: Call w/ Root
Argument 1: 2
[type Object]
Is it the global object: true
Argument 0: Fake arguments object
Argument 1: 5
Let's try some things that don't work
undefined
undefined
Those do NOT generate errors on FP7/AS2.

Binary file not shown.

Binary file not shown.