public void TestArraysortanddel() { var res_arr = _setarray.SortAndFilter(new int[] { -4, -4, 0, -3, -5, -3, 2, 1, 4, 7, 5, 6, 8, 9, 9 }); int[] b; b = new int[] { -5, -4, -3, 0, 1, 2, 4, 5, 6, 7, 8, 9, 9 }; CollectionAssert.AreEqual(res_arr, b); }
public void Test_array_() { ArrayProcessor array = new ArrayProcessor(); int[] X = { -5, -2, -2, -2, -8, -5, 10, 11, 11, 45 }; int a = array.SortAndFilter(X).Length; int[] Y = new int[a]; Y = array.SortAndFilter(X); int[] X1 = { -8, -5, -2, 10, 11, 45 }; CollectionAssert.AreEquivalent(X1, Y); }
public void Delete_repeating_elements() { int[] X = { -5, -5, -5, -5, -5 }; int[] Y = new int[X.Length]; ArrayProcessor array = new ArrayProcessor(); Y = array.SortAndFilter(X); Assert.AreEqual(-5, Y[0]); }
public void Sort_elements() { int[] X = { -5, -2, -8, 10, 11, 45 }; int[] Y = new int[X.Length]; ArrayProcessor array = new ArrayProcessor(); Y = array.SortAndFilter(X); int[] X1 = { -8, -5, -2, 10, 11, 45 }; CollectionAssert.AreEqual(X1, Y); }
public void TestMethod8() { int[] a = { 1, 5, 11111, 0, -4850 }; int[] c = _arrayProcessor.SortAndFilter(a); Assert.AreEqual(c[0], 11111); }