Пример #1
0
        public bool test_EqualFalse(out string message)
        {
            message = "";
            XmlWorker.DataNode a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            XmlWorker.DataNode b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            a.NodeValue = 874;
            b.NodeValue = 144;
            if (a.Equal(b))
            {
                message = "wrong result of Equal - value";
                return false;
            }

            a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            a.NodeValue = new int[123, 874];
            b.NodeValue = new int[874, 123];
            if (a.Equal(b))
            {
                message = "wrong result of Equal - diffrent references on diffrent values";
                return false;
            }
            
            a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            a.NodeValue = new int[874, 123];
            b.NodeValue = new int[874, 123];
            if (a.Equal(b))
            {
                message = "wrong result of Equal - diffrent references on same values";
                return false;
            }

            return true;
        }
Пример #2
0
        public bool test_EqualFalse(out string message)
        {
            message = "";
            XmlWorker.DataNode a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            XmlWorker.DataNode b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            a.NodeValue = 874;
            b.NodeValue = 144;
            if (a.Equal(b))
            {
                message = "wrong result of Equal - value";
                return(false);
            }

            a           = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            b           = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            a.NodeValue = new int[123, 874];
            b.NodeValue = new int[874, 123];
            if (a.Equal(b))
            {
                message = "wrong result of Equal - diffrent references on diffrent values";
                return(false);
            }

            a           = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            b           = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            a.NodeValue = new int[874, 123];
            b.NodeValue = new int[874, 123];
            if (a.Equal(b))
            {
                message = "wrong result of Equal - diffrent references on same values";
                return(false);
            }

            return(true);
        }
Пример #3
0
        public bool test_EqualTrue(out string message)
        {
            message = "";
            XmlWorker.DataNode a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            XmlWorker.DataNode b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            a.NodeValue = 874;
            b.NodeValue = 874;
            if (!a.Equal(b))
            {
                message = "wrong result of Equal - value";
                return false;
            }

            a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            a.NodeValue = b.NodeValue = new int[874, 123];
            if (!a.Equal(b))
            {
                message = "wrong result of Equal - reference";
                return false;
            }

            return true;
        }
Пример #4
0
        public bool test_EqualTrue(out string message)
        {
            message = "";
            XmlWorker.DataNode a = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            XmlWorker.DataNode b = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Leaf);
            a.NodeValue = 874;
            b.NodeValue = 874;
            if (!a.Equal(b))
            {
                message = "wrong result of Equal - value";
                return(false);
            }

            a           = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            b           = new XmlWorker.DataNode(XmlWorker.DataNode.NodeType.Branch);
            a.NodeValue = b.NodeValue = new int[874, 123];
            if (!a.Equal(b))
            {
                message = "wrong result of Equal - reference";
                return(false);
            }

            return(true);
        }