public void NegativeEvaluateOldExpressionsAfterPreconditions() { var c = new CodeUnderTest.EvaluateOldExpressionsAfterPreconditions.C(); c.M(null); // if the old value for xs.Length is evaluated before the precondition this results in a null dereference }
public void PositiveEvaluateFailingOldExpression2() { var c = new CodeUnderTest.EvaluateOldExpressionsAfterPreconditions.C(); c.ConditionalOld(new int[] { 3, 4 }); }
public void PositiveEvaluateOldExpressionsAfterPreconditions() { var c = new CodeUnderTest.EvaluateOldExpressionsAfterPreconditions.C(); int[] A = new int[] { 3, 4, 5 }; c.M(A); }