From 8b3491fe531d721608ae4bb4f471e66a8a793334 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Mon, 17 Apr 2023 18:17:38 +0200 Subject: [PATCH] tests: Update the XML abstract equality test --- .../swfs/avm2/xml_abstract_equality/Test.as | 22 ++++++++---------- .../avm2/xml_abstract_equality/output.txt | 10 ++++++++ .../swfs/avm2/xml_abstract_equality/test.swf | Bin 1609 -> 1805 bytes 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/tests/tests/swfs/avm2/xml_abstract_equality/Test.as b/tests/tests/swfs/avm2/xml_abstract_equality/Test.as index a94b079cd..44a8a18cb 100644 --- a/tests/tests/swfs/avm2/xml_abstract_equality/Test.as +++ b/tests/tests/swfs/avm2/xml_abstract_equality/Test.as @@ -10,8 +10,9 @@ trace("simple:", simple.toXMLString()); trace("simple == simple:", simple == simple); trace('simple == "abc":', simple == "abc"); trace("simple == simple.children()[0] [text]:", simple == simple.children()[0]); -// TODO -// trace("simple == abc", simple == abc); +trace("simple == abc", simple == abc); +trace('simple == abc', simple == abc); +trace("simple == abc", simple == abc); var true_XML: XML = true; trace("true_XML:", true_XML.toXMLString()); @@ -23,37 +24,34 @@ trace("attr.@hello == attr.@hello:", attr.@hello == attr.@hello); trace('attr.@hello == "world":', attr.@hello == "world"); trace("attr.@hello == world:", attr.@hello == world); trace('attr.@hello == "foobar":', attr.@hello == "foobar"); -// TODO -// trace("attr.@hello == world:", attr.@hello == world); +trace("attr.@hello == world:", attr.@hello == world); var xml: XML = atrue123b1b2; trace("xml:", xml.toXMLString()); trace("xml == xml:", xml == xml); var xml_a: XMLList = xml.a; trace("xml_a == xml_a:", xml_a == xml_a); -// TODO: (xml.a creates a new list every time so not supported currently) -// trace("xml.a == xml.a:", xml.a == xml.a); +trace("xml.a == xml.a:", xml.a == xml.a); trace('xml.a == "a":', xml.a == "a"); trace('xml.t == true:', xml.t == true); trace('xml.n == 123:', xml.n == 123); trace('xml.n == "123":', xml.n == "123"); trace('xml.n == 42:', xml.n == 42); -// TODO -// trace("xml.b == xml.b:", xml.b == xml.b); +trace("xml.b == xml.b:", xml.b == xml.b); trace('xml.b == xml.a:', xml.b == xml.a); var other: XML = b1b2; trace("other:", other.toXMLString()); -// TODO -// trace("xml.b == other.y:", xml.b == other.y); +trace("xml.b == other.y:", xml.b == other.y); var other2: XML = b1b2 trace("other2:", other2.toXMLString()); -// TODO -// trace("xml.b == other2.b:", xml.b == other2.b) +trace("xml.b == other2.b:", xml.b == other2.b) var attrs: XML = ; trace("attrs:", attrs.toXMLString()); +trace('attrs == ', attrs == ); +trace('attrs == ', attrs == ); trace("xml.b == attrs.attributes():", xml.b == attrs.attributes()); trace('xml.child("unknown") == undefined:', xml.child("unknown") == undefined); diff --git a/tests/tests/swfs/avm2/xml_abstract_equality/output.txt b/tests/tests/swfs/avm2/xml_abstract_equality/output.txt index e43b6dab8..48edd586b 100644 --- a/tests/tests/swfs/avm2/xml_abstract_equality/output.txt +++ b/tests/tests/swfs/avm2/xml_abstract_equality/output.txt @@ -2,6 +2,9 @@ simple: abc simple == simple: true simple == "abc": true simple == simple.children()[0] [text]: true +simple == abc true +simple == abc false +simple == abc false true_XML: true true_XML == true: true attr: @@ -9,18 +12,25 @@ attr.@hello == attr.@hello: true attr.@hello == "world": true attr.@hello == world: true attr.@hello == "foobar": false +attr.@hello == world: false xml: atrue123b1b2 xml == xml: true xml_a == xml_a: true +xml.a == xml.a: true xml.a == "a": true xml.t == true: true xml.n == 123: true xml.n == "123": true xml.n == 42: false +xml.b == xml.b: true xml.b == xml.a: false other: b1b2 +xml.b == other.y: false other2: b1b2 +xml.b == other2.b: true attrs: +attrs == false +attrs == true xml.b == attrs.attributes(): true xml.child("unknown") == undefined: true xml.child("unknown") == "": false diff --git a/tests/tests/swfs/avm2/xml_abstract_equality/test.swf b/tests/tests/swfs/avm2/xml_abstract_equality/test.swf index edf2a07733d470479e70fca66ad657a5f4793981..d3296ddfd61f9f6245587d1c59c6039a61d95bcb 100644 GIT binary patch literal 1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