tests: Test XML.hasOwnProperty

This commit is contained in:
Tom Schuster 2023-04-29 11:53:05 +02:00 committed by Aaron Hill
parent 791081051f
commit 69134d7d8d
4 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,12 @@
package {
import flash.display.Sprite;
public class Test extends Sprite { }
}
var xml: XML = <a attr="1"><b>bbb</b></a>;
trace('xml.hasOwnProperty("@attr"): ' + xml.hasOwnProperty("@attr"));
trace('xml.hasOwnProperty("@unknown"): ' + xml.hasOwnProperty("@unknown"));
trace('xml.hasOwnProperty("b"): ' + xml.hasOwnProperty("b"));
trace('xml.hasOwnProperty("em"): ' + xml.hasOwnProperty("em"));
trace('xml.hasOwnProperty("toXMLString"): ' + xml.hasOwnProperty("toXMLString"));
trace('xml.hasOwnProperty("isPropertyEnumerable"): ' + xml.hasOwnProperty("isPropertyEnumerable"));

View File

@ -0,0 +1,6 @@
xml.hasOwnProperty("@attr"): true
xml.hasOwnProperty("@unknown"): false
xml.hasOwnProperty("b"): true
xml.hasOwnProperty("em"): false
xml.hasOwnProperty("toXMLString"): false
xml.hasOwnProperty("isPropertyEnumerable"): false

Binary file not shown.

View File

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