private static void TestMoveZeros() { MoveZero mz = new MoveZero(); //int[] result = mz.MoveZeroes(new int[3] { 0, 0, 1 }); int[] result = mz.MoveZeroes(new int[28] { 0, 0, 1, 4, 3, 2, 7, 8, 0, 12, 5, 8, 16, 0, 31, 0, 54, 98, 0, 1, 2, 3, 5, 6, 0, 10, 100, 6 }); }
public void MoveZeroesTest() { MoveZero test = new MoveZero(); int[] numsInA = { 0, 1, 0, 3, 12, 0 }; int[] numsOut = { 1, 3, 12, 0, 0, 0 }; int[] numsIn = (test.MoveZeroes(numsInA)).ToArray(); //if (numsOut==numsIn) //{ Assert.IsTrue(numsIn.Count() == 6); //} }