stat/combin: allow user allocation for Cartesian product

This commit is contained in:
Dan Kortschak
2019-10-24 19:27:42 +10:30
parent 7e1144f373
commit f54cad9e6d
3 changed files with 4 additions and 4 deletions

View File

@@ -318,7 +318,7 @@ func TestCartesianGenerator(t *testing.T) {
gen := NewCartesianGenerator([]int{1, 2, 3})
iterations := 0
for gen.Next() {
got := gen.Product()
got := gen.Product(nil)
if !reflect.DeepEqual(got, want[iterations]) {
t.Errorf("Cartesian product does not match. want: %v got: %v", want[iterations], got)
}