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"); }
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"); }
internal string[] StatementPairLoopCtor([PexAssumeUnderTest] StatementPairLoop target) { return(target.CodeItUp().ToArray()); }