@@ -9,7 +9,6 @@ public class ClosestPairTest {
9
9
10
10
@ Test
11
11
public void testBuildLocation () {
12
- // Test creating a point using the buildLocation method
13
12
ClosestPair cp = new ClosestPair (1 );
14
13
ClosestPair .Location point = cp .buildLocation (3.0 , 4.0 );
15
14
assertNotNull (point );
@@ -19,7 +18,6 @@ public void testBuildLocation() {
19
18
20
19
@ Test
21
20
public void testCreateLocation () {
22
- // Test creating an array of locations using the createLocation method
23
21
ClosestPair cp = new ClosestPair (5 );
24
22
ClosestPair .Location [] locations = cp .createLocation (5 );
25
23
assertNotNull (locations );
@@ -28,7 +26,6 @@ public void testCreateLocation() {
28
26
29
27
@ Test
30
28
public void testXPartition () {
31
- // Test xPartition method: Sorting points by x-coordinate
32
29
ClosestPair cp = new ClosestPair (5 );
33
30
ClosestPair .Location [] points = new ClosestPair .Location [5 ];
34
31
points [0 ] = cp .buildLocation (2.0 , 3.0 );
@@ -48,7 +45,6 @@ public void testXPartition() {
48
45
49
46
@ Test
50
47
public void testYPartition () {
51
- // Test yPartition method: Sorting points by y-coordinate
52
48
ClosestPair cp = new ClosestPair (5 );
53
49
ClosestPair .Location [] points = new ClosestPair .Location [5 ];
54
50
points [0 ] = cp .buildLocation (2.0 , 3.0 );
@@ -68,7 +64,6 @@ public void testYPartition() {
68
64
69
65
@ Test
70
66
public void testBruteForce () {
71
- // Test bruteForce method to handle 2 points
72
67
ClosestPair cp = new ClosestPair (2 );
73
68
ClosestPair .Location loc1 = cp .buildLocation (1.0 , 2.0 );
74
69
ClosestPair .Location loc2 = cp .buildLocation (4.0 , 6.0 );
0 commit comments