public void PrintingIsTest() { var b = new object(); PAssert.IsTrue(() => b is string); }
public void PrintingUnaryNot() { var b = true; PAssert.IsTrue(() => !b); }
public void PrintingUnaryNegate() { var b = 5; PAssert.IsTrue(() => - b == 0); }
public void PrintingLinqExpressionStatements() { var list = Enumerable.Range(0, 150); PAssert.IsTrue(() => (from l in list where l % 2 == 0 select l).Sum() == 0); }
public void PrintingComplexLinqExpressionStatements() { var list = Enumerable.Range(0, 5); PAssert.IsTrue(() => (from x in list from y in list where x > y select x + "," + y).Count() == 0); }
public void PrintingNewArrayTest() { var array = new int[]{1,2,3}; PAssert.IsTrue(() => array.Equals(new[]{4,5,6})); }
public void PrintingLinqStatements() { var list = Enumerable.Range(0, 150); PAssert.IsTrue(() => list.Where(x => x % 2 == 0).Sum() == 0); }
public void PrintingDelegateMethodGroupInvocation() { var array = new int[] { 1, 2, 3 }; PAssert.IsTrue(() => array.Any(GreaterThan3)); }
public void PrintingEnumerablesWithNulls() { var list = new List<int?>{1,2,null,4,5}; PAssert.IsTrue(() => list.Sum() == null); }
public void SequenceEqualButNotOperatorEquals() { object list = new List<int>{1,2,3}; object array = new[] { 1, 2, 3 }; PAssert.IsTrue(() => list == array); }
public void PrintingDelegateInvocation() { var array = new int[] { 1, 2, 3 }; PAssert.IsTrue(() => array.Any(x => x > 3)); }
public void RunTypeOfExpression() { int x = 1; PAssert.IsTrue(() => x.GetType() == typeof(string)); }
public void RunStringCompare() { string s = "hello, bobby"; Tuple<string> t = new Tuple<string>("hello, Bobby"); PAssert.IsTrue(() => s == t.Item1); }
public void RunComplexExpressionWithStaticField() { int y = 6; DateTime d = new DateTime(2010, 3, 1); PAssert.IsTrue(() => field + 5 == d.Month * y); }
public void RunComplexExpression3() { List<int> l = new List<int> { 1, 2, 3 }; bool b = false; PAssert.IsTrue(() => l[2].ToString() == (b ? "three" : "four")); }
public void RunComplexExpression2() { string x = " lalalaa "; int i = 10; PAssert.IsTrue(() => x.Trim().Length == Math.Max(4, new int[] { 5, 4, i / 3, 2 }[0])); }