1package sudoku23import (4 "math/rand/v2"5 "testing"6)78func TestGenerateProvidedCellsUniquenessAcrossModes(t *testing.T) {9 for modeIndex, mode := range benchmarkSudokuModes() {10 t.Run(mode.Title(), func(t *testing.T) {11 rng := rand.New(rand.NewPCG(uint64(modeIndex+101), uint64(modeIndex+1001)))12 cells := GenerateProvidedCellsSeeded(mode, rng)13 if len(cells) < mode.ProvidedCount {14 t.Fatalf("generated %d clues, want >= %d", len(cells), mode.ProvidedCount)15 }1617 g := newGrid(cells)18 if got := countSolutions(&g, 2); got != 1 {19 t.Fatalf("countSolutions(limit=2) = %d, want 1", got)20 }21 })22 }23}