Explorar el Código

rozkład liczby na czynniki pierwsze 23

user hace 1 año
padre
commit
9afdfaaba2
Se han modificado 1 ficheros con 14 adiciones y 0 borrados
  1. 14 0
      4/src/test/java/PrimeFactorsCalculatorTest.java

+ 14 - 0
4/src/test/java/PrimeFactorsCalculatorTest.java

@@ -13,6 +13,20 @@ public class PrimeFactorsCalculatorTest {
         test(EMPTY_LIST,1);
     }
 
+    @Test
+    void testGetFactorsValues2() {
+        test(List.of(2, 2), 4);
+        test(List.of(2), 2);
+        test(List.of(3), 3);
+        test(List.of(2, 2), 4);
+        test(List.of(5), 5);
+        test(List.of(2, 3), 6);
+        test(List.of(7), 7);
+        test(List.of(2, 2, 2), 8);
+        test(List.of(3, 3), 9);
+        test(List.of(2, 5), 10);
+    }
+
     private void test(List<Integer> l, int n) {
         List<Integer> factors = calculator.getFactors(n);
         assertIterableEquals(l, factors);