public void XOrX() { INode root = new Logic.Or(VariableNode.Make<bool>(0, "x"), VariableNode.Make<bool>(0, "x")); Assert.AreEqual( SimplifyLogicTree(root).ToString(), VariableNode.Make<bool>(0, "x").ToString()); }
public void OrZero() { INode root = new Logic.Or(VariableNode.Make<bool>(0, "x"), new Constant<bool>(false)); Assert.AreEqual( SimplifyLogicTree(root).ToString(), VariableNode.Make<bool>(0, "x").ToString()); }
public void XOrNotX() { INode root = new Logic.Or(new Logic.Not(VariableNode.Make<bool>(0, "x")), VariableNode.Make<bool>(0, "x")); Assert.AreEqual( SimplifyLogicTree(root).ToString(), Constant.Bool(true).ToString()); }
public void OrOne() { INode root = new Logic.Or(VariableNode.Make<bool>(0, "x"), new Constant<bool>(true)); Assert.AreEqual( SimplifyLogicTree(root).ToString(), bool.TrueString); }