Ejemplo n.º 1
0
        public void TestRemoveOfNothing()
        {
            var c      = new CodeContext();
            var popper = c.Remove("dude");

            popper.Pop();
        }
Ejemplo n.º 2
0
        public void TestRemoveAndPopRemove()
        {
            var c = new CodeContext();
            var myvar = Expression.Variable(typeof(int), "d");
            c.Add("dude", myvar);

            var popper = c.Remove("dude");
            Assert.IsNull(c.GetReplacement("dude"), "incorrect dummy name");
            popper.Pop();
            Assert.AreEqual("d", (c.GetReplacement("dude") as ParameterExpression).Name, "incorrect dummy name");
        }
Ejemplo n.º 3
0
        public void TestRemoveAndPopRemove()
        {
            var c     = new CodeContext();
            var myvar = Expression.Variable(typeof(int), "d");

            c.Add("dude", myvar);

            var popper = c.Remove("dude");

            Assert.IsNull(c.GetReplacement("dude"), "incorrect dummy name");
            popper.Pop();
            Assert.AreEqual("d", (c.GetReplacement("dude") as ParameterExpression).Name, "incorrect dummy name");
        }
Ejemplo n.º 4
0
 public void TestRemoveOfNothing()
 {
     var c = new CodeContext();
     var popper = c.Remove("dude");
     popper.Pop();
 }