Add tests that fails to be detected as a negative index.
(-1,-1) or (Integer.MAX_VALUE, 2, Integer.MAX_VALUE) are not negative as
a total product.
@@ -31,6 +31,8 @@ public class MultidimensionalCounterTest {
Assertions.assertThrows(IllegalArgumentException.class, () -> MultidimensionalCounter.of(0, 1));
Assertions.assertThrows(IllegalArgumentException.class, () -> MultidimensionalCounter.of(2, 0));
Assertions.assertThrows(IllegalArgumentException.class, () -> MultidimensionalCounter.of(-1, 1));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> MultidimensionalCounter.of(-1, -1));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> MultidimensionalCounter.of(Integer.MAX_VALUE, 2, Integer.MAX_VALUE));
final MultidimensionalCounter c = MultidimensionalCounter.of(2, 3);
Assertions.assertThrows(IllegalArgumentException.class, () -> c.toUni(1, 1, 1));
