public void NumberPermuterShouldWorkForTwoNumbersNoRepeats() { var output = NumberPermuterWithRepeats.RecursivePermuteWithDepthAndArrayUnroll(ArrayRangeToN(2), EmptyDoubleArray, 2); var predicted = new[] { new[] { 1, 2 }.ToList(), new[] { 2, 1 }.ToList() }.ToList(); TestOutputsMatch(output, predicted); }
public void NumberPermuterShouldWorkForSingleNumberRepeated() { var output = NumberPermuterWithRepeats.RecursivePermuteWithDepthAndArrayUnroll(EmptySingleArray, new[, ] { { 1, 4 } }, 4); var predicted = new[] { new[] { 1, 1, 1, 1 }.ToList() }.ToList(); TestOutputsMatch(output, predicted); }
public void NumberPermuterShouldWorkForSingleNumberRepeatedWithOtherNumbers2() { var output = NumberPermuterWithRepeats.RecursivePermuteWithDepthAndArrayUnroll(ArrayRangeToN(2), new[, ] { { 2, 3 }, { 3, 4 } }, 7); var predicted = new[] { new[] { 1, 2, 2 }.ToList(), new[] { 2, 1, 2 }.ToList(), new[] { 2, 2, 1 }.ToList(), }.ToList(); TestOutputsMatch(output, predicted); }