public void AddTaintIf() { var clean = new AbstractValue(0x31337); Assert.IsFalse(clean.IsTainted); var notTainted = clean.AddTaintIf(0 == 1); Assert.IsFalse(notTainted.IsTainted); Assert.AreSame(clean, notTainted); var tainted = clean.AddTaintIf(1 == 1); Assert.IsTrue(tainted.IsTainted); Assert.AreNotSame(clean, tainted); }
public void AddTaintIf() { var clean = new AbstractValue(0x31337); Assert.IsFalse(clean.IsTainted); var notTainted = clean.AddTaintIf(0 == 1); Assert.IsFalse(notTainted.IsTainted); Assert.AreSame(clean, notTainted); var tainted = clean.AddTaintIf(1 == 1); Assert.IsTrue(tainted.IsTainted); Assert.AreNotSame(clean, tainted); }