public void TwoOperationsTest() { check = new int[] { -1, 0, 5, 13451, 23, -43252, 555 }; list = ListMethods.Map(list, x => x * 2); list = ListMethods.Map(list, x => x / 2); AssertAll(list, check); }
public void ThreeOperationsTest() { check = new int[] { 0, 0, 0, 0, 0, -0, 0 }; list = ListMethods.Map(list, x => x * 2); list = ListMethods.Map(list, x => x / 2); list = ListMethods.Map(list, x => x * 0); AssertAll(list, check); }
public void SubtractionOneTest() { check = new int[] { -2, -1, 4, 13450, 22, -43253, 554 }; list = ListMethods.Map(list, x => x - 1); AssertAll(list, check); }
public void AdditionZeroTest() { check = new int[] { -1, 0, 5, 13451, 23, -43252, 555 }; list = ListMethods.Map(list, x => x + 0); AssertAll(list, check); }
public void MulitToNegativeTest() { check = new int[] { 1, 0, -5, -13451, -23, 43252, -555 }; list = ListMethods.Map(list, x => x *= -1); AssertAll(list, check); }
public void MultToZeroTest() { check = new int[] { 0, 0, 0, 0, 0, 0, 0 }; list = ListMethods.Map(list, x => x * 0); AssertAll(list, check); }
public void MultTo2Test() { check = new int[] { -2, 0, 10, 26902, 46, -86504, 1110 }; list = ListMethods.Map(list, x => x * 2); AssertAll(list, check); }