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; }
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); }
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; }
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); }