Repository: flex-sdk Updated Branches: refs/heads/develop e6210027c -> 727de51ee
FLEX-35031 Added more unit tests for ObjectUtil.isDynamicObject() to test that it returns correctly for XML, Proxy and ObjectProxy. Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/727de51e Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/727de51e Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/727de51e Branch: refs/heads/develop Commit: 727de51ee82831ae4184f12a37c62cdb41465d6c Parents: e621002 Author: Mihai Chira <[email protected]> Authored: Mon Feb 22 12:03:22 2016 +0100 Committer: Mihai Chira <[email protected]> Committed: Mon Feb 22 12:03:22 2016 +0100 ---------------------------------------------------------------------- .../tests/mx/utils/ObjectUtil_Tests.as | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/727de51e/frameworks/projects/framework/tests/mx/utils/ObjectUtil_Tests.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/framework/tests/mx/utils/ObjectUtil_Tests.as b/frameworks/projects/framework/tests/mx/utils/ObjectUtil_Tests.as index 5c6e570..f45de1b 100644 --- a/frameworks/projects/framework/tests/mx/utils/ObjectUtil_Tests.as +++ b/frameworks/projects/framework/tests/mx/utils/ObjectUtil_Tests.as @@ -19,6 +19,7 @@ package mx.utils { import flash.utils.Dictionary; + import flash.utils.Proxy; import org.flexunit.asserts.assertEquals; @@ -55,6 +56,34 @@ package mx.utils { } [Test] + public function test_XML_instance_recognized_as_dynamic_object():void + { + //then + assertTrue(ObjectUtil.isDynamicObject(new XML())); + } + + [Test] + public function test_Proxy_instance_recognized_as_sealed_object_instance():void + { + //then + assertFalse(ObjectUtil.isDynamicObject(new Proxy())); + } + + [Test] + public function test_ObjectProxy_with_implicit_target_object_instance_recognized_as_dynamic_instance():void + { + //then + assertTrue(ObjectUtil.isDynamicObject(new ObjectProxy())); + } + + [Test] + public function test_ObjectProxy_with_explicit_target_object_instance_recognized_as_dynamic_instance():void + { + //then + assertTrue(ObjectUtil.isDynamicObject(new ObjectProxy({}))); + } + + [Test] public function test_dictionary_instance_recognized_as_dynamic_object():void { //then
