예제 #1
0
        public void TestAddOutsideLoopWithJustIn2Loops()
        {
            var target = new GeneratedCode();

            target.Add(new Statements.StatementInlineBlock());
            var loop = new LINQToTTreeLib.Tests.TestUtils.SimpleLoop();

            target.Add(loop);
            target.Add(new LINQToTTreeLib.Tests.TestUtils.SimpleLoop());
            target.AddOutsideLoop(DeclarableParameter.CreateDeclarableParameterExpression(typeof(int)));
            Assert.AreEqual(1, loop.DeclaredVariables.Count(), "# of loop declared variables");
        }
예제 #2
0
 public void TestAddOutsideLoopWithJustIn2Loops()
 {
     var target = new GeneratedCode();
     target.Add(new Statements.StatementInlineBlock());
     var loop = new LINQToTTreeLib.Tests.TestUtils.SimpleLoop();
     target.Add(loop);
     target.Add(new LINQToTTreeLib.Tests.TestUtils.SimpleLoop());
     target.AddOutsideLoop(DeclarableParameter.CreateDeclarableParameterExpression(typeof(int)));
     Assert.AreEqual(1, loop.DeclaredVariables.Count(), "# of loop declared variables");
 }