public void NegativeLocalAsResult2() { try { var c = new CodeUnderTest.LocalVariableForResult.C(); c.Test2(2, new bool[] { }); throw new Exception("Expected failure did not happen"); } catch (TestRewriterMethods.PostconditionException p) { Assert.AreEqual(": result != false", p.Message); } }
public void NegativeLocalAsResult3() { try { var c = new CodeUnderTest.LocalVariableForResult.C(); c.Test2(1, new bool[] { true, false }); throw new Exception("Expected failure did not happen"); } catch (TestRewriterMethods.PostconditionException p) { Assert.AreEqual(": Contract.ForAll(0, arr.Length, i => arr[i] == result)", p.Message); } }
public void PositiveLocalAsResult3() { var c = new CodeUnderTest.LocalVariableForResult.C(); c.Test2(1, new bool[] { true, true, true }); }