@@ -13,13 +13,13 @@ public void testFactorizationOfEvenNumber() {
13
13
ShorAlgorithm shor = new ShorAlgorithm ();
14
14
BigInteger number = new BigInteger ("15" );
15
15
BigInteger [] factors = shor .shorAlgorithm (number );
16
-
16
+
17
17
assertNotNull (factors , "Factors should not be null for composite numbers." );
18
18
assertEquals (2 , factors .length , "There should be two factors." );
19
-
19
+
20
20
BigInteger p = factors [0 ];
21
21
BigInteger q = factors [1 ];
22
-
22
+
23
23
assertEquals (number , p .multiply (q ), "Factors should multiply to the original number." );
24
24
}
25
25
@@ -28,7 +28,7 @@ public void testFactorizationOfPrimeNumber() {
28
28
ShorAlgorithm shor = new ShorAlgorithm ();
29
29
BigInteger number = new BigInteger ("13" );
30
30
BigInteger [] factors = shor .shorAlgorithm (number );
31
-
31
+
32
32
assertNull (factors , "Factors should be null for prime numbers." );
33
33
}
34
34
@@ -37,13 +37,13 @@ public void testFactorizationOfEvenCompositeNumber() {
37
37
ShorAlgorithm shor = new ShorAlgorithm ();
38
38
BigInteger number = new BigInteger ("20" );
39
39
BigInteger [] factors = shor .shorAlgorithm (number );
40
-
40
+
41
41
assertNotNull (factors , "Factors should not be null for composite numbers." );
42
42
assertEquals (2 , factors .length , "There should be two factors." );
43
-
43
+
44
44
BigInteger p = factors [0 ];
45
45
BigInteger q = factors [1 ];
46
-
46
+
47
47
assertEquals (number , p .multiply (q ), "Factors should multiply to the original number." );
48
48
}
49
49
}
0 commit comments