Beispiel #1
0
 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());
 }
Beispiel #2
0
 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());
 }
Beispiel #3
0
 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());
 }
Beispiel #4
0
 public void OrOne()
 {
     INode root = new Logic.Or(VariableNode.Make<bool>(0, "x"), new Constant<bool>(true));
     Assert.AreEqual(
         SimplifyLogicTree(root).ToString(), bool.TrueString);
 }