Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }