A statement that asserts that a condition must always be true when execution reaches it. For example the assert statement of Spec#.
상속: Statement, IAssertStatement
예제 #1
0
 private void AddAssertion(IExpression condition)
 {
     AssertStatement assertStatement = new AssertStatement();
       assertStatement.Condition = condition;
       this.GetOrCreateStmtListForStmt(this.currentStatement).Add(assertStatement);
 }
예제 #2
0
파일: Copier.cs 프로젝트: riverar/devtools
 /// <summary>
 /// Visits the specified assert statement.
 /// </summary>
 /// <param name="assertStatement">The assert statement.</param>
 /// <returns></returns>
 protected virtual IStatement DeepCopy(AssertStatement assertStatement)
 {
     assertStatement.Condition = this.Substitute(assertStatement.Condition);
       return assertStatement;
 }
예제 #3
0
파일: Copier.cs 프로젝트: riverar/devtools
 /// <summary>
 /// Visits the specified assert statement.
 /// </summary>
 /// <param name="assertStatement">The assert statement.</param>
 public override void Visit(IAssertStatement assertStatement)
 {
     AssertStatement mutableAssertStatement = new AssertStatement(assertStatement);
     this.resultStatement = this.myCodeCopier.DeepCopy(mutableAssertStatement);
 }
예제 #4
0
파일: Mutator.cs 프로젝트: riverar/devtools
 /// <summary>
 /// Rewrites the children of the given assert statement.
 /// </summary>
 /// <param name="assertStatement"></param>
 public virtual void RewriteChildren(AssertStatement assertStatement)
 {
     this.RewriteChildren((Statement)assertStatement);
       assertStatement.Condition = this.Rewrite(assertStatement.Condition);
       if (assertStatement.Description != null)
     assertStatement.Description = this.Rewrite(assertStatement.Description);
 }
예제 #5
0
파일: Mutator.cs 프로젝트: riverar/devtools
 /// <summary>
 /// Visits the specified assert statement.
 /// </summary>
 /// <param name="assertStatement">The assert statement.</param>
 public override void Visit(IAssertStatement assertStatement)
 {
     AssertStatement mutableAssertStatement = assertStatement as AssertStatement;
     if (alwaysMakeACopy || mutableAssertStatement == null) mutableAssertStatement = new AssertStatement(assertStatement);
     this.resultStatement = this.myCodeMutator.Visit(mutableAssertStatement);
 }
예제 #6
0
파일: Mutator.cs 프로젝트: riverar/devtools
 /// <summary>
 /// Visits the specified assert statement.
 /// </summary>
 /// <param name="assertStatement">The assert statement.</param>
 /// <returns></returns>
 public virtual IStatement Visit(AssertStatement assertStatement)
 {
     assertStatement.Condition = this.Visit(assertStatement.Condition);
       return assertStatement;
 }