Example #1
0
        public void TestForEmittingNoStatements()
        {
            var array  = DeclarableParameter.CreateDeclarableParameterArrayExpression(typeof(int));
            var index1 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
            var index2 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
            var t      = new StatementPairLoop(array, index1, index2);

            Assert.AreEqual(0, t.CodeItUp().Count(), "# of lines incorrect");
        }
Example #2
0
        public void TestForEmittingSimpleStatement()
        {
            var array  = DeclarableParameter.CreateDeclarableParameterArrayExpression(typeof(int));
            var index1 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
            var index2 = DeclarableParameter.CreateDeclarableParameterExpression(typeof(int));
            var t      = new StatementPairLoop(array, index1, index2);

            t.Add(new LINQToTTreeLib.Statements.StatementSimpleStatement("dir"));
            Assert.AreEqual(9, t.CodeItUp().Count(), "# of lines incorrect");
        }
Example #3
0
 internal string[] StatementPairLoopCtor([PexAssumeUnderTest] StatementPairLoop target)
 {
     return(target.CodeItUp().ToArray());
 }