public void Find_TestArray7_ReturnsTrue() { // Specifically looking for an array that just has a zero at any index List <int[]> list = SubArrayWithZeroSum.Find(TestArray7); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 0 }))); }
public void Find_TestArray6_ReturnsTrue() { List <int[]> list = SubArrayWithZeroSum.Find(TestArray6); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 0, 1, 3, -4, 5, -5 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 0, 1, 3, -4, 5, -5 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 1, 3, -4, 5, -5 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 3, -4, 5, -5, 1 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 0, 1, 3, -4 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 1, 3, -4 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 5, -5 }))); Assert.IsTrue(list.Any(x => x.SequenceEqual(new int[] { 0 }))); }