(t *testing.T)
| 5 | ) |
| 6 | |
| 7 | func TestUniquePaths(t *testing.T) { |
| 8 | testCases := map[string]struct { |
| 9 | m int |
| 10 | n int |
| 11 | want int |
| 12 | }{ |
| 13 | "negative sizes": {-1, -1, 0}, |
| 14 | "empty matrix both dimensions": {0, 0, 0}, |
| 15 | "empty matrix one dimension": {0, 1, 0}, |
| 16 | "one element": {1, 1, 1}, |
| 17 | "small matrix": {2, 2, 2}, |
| 18 | "stress test": {1000, 1000, 2874513998398909184}, |
| 19 | } |
| 20 | |
| 21 | for name, test := range testCases { |
| 22 | t.Run(name, func(t *testing.T) { |
| 23 | if got := UniquePaths(test.m, test.n); got != test.want { |
| 24 | t.Errorf("UniquePaths(%v, %v) = %v, want %v", test.m, test.n, got, test.want) |
| 25 | } |
| 26 | }) |
| 27 | } |
| 28 | } |
nothing calls this directly
no test coverage detected