1
1
package com .thealgorithms .backtracking ;
2
2
3
3
import static org .junit .jupiter .api .Assertions .assertEquals ;
4
+ import static org .junit .jupiter .api .Assertions .assertFalse ;
5
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
4
6
5
7
import java .util .ArrayList ;
6
8
import org .junit .jupiter .api .Test ;
@@ -16,7 +18,7 @@ void testGraphColoring1() {
16
18
int [][] graph = {{0 , 1 , 1 , 1 }, {1 , 0 , 1 , 0 }, {1 , 1 , 0 , 1 }, {1 , 0 , 1 , 0 }};
17
19
int m = 3 ; // Number of colors
18
20
19
- assertEquals ( true , MColoring .isColoringPossible (createGraph (graph ), n , m ));
21
+ assertTrue ( MColoring .isColoringPossible (createGraph (graph ), n , m ));
20
22
}
21
23
22
24
@ Test
@@ -25,7 +27,7 @@ void testGraphColoring2() {
25
27
int [][] graph = {{0 , 1 , 1 , 1 , 0 }, {1 , 0 , 0 , 1 , 0 }, {1 , 0 , 0 , 1 , 1 }, {1 , 1 , 1 , 0 , 1 }, {0 , 0 , 1 , 1 , 0 }};
26
28
int m = 2 ; // Number of colors
27
29
28
- assertEquals ( false , MColoring .isColoringPossible (createGraph (graph ), n , m ));
30
+ assertFalse ( MColoring .isColoringPossible (createGraph (graph ), n , m ));
29
31
}
30
32
31
33
@ Test
@@ -34,7 +36,7 @@ void testGraphColoring3() {
34
36
int [][] graph = {{0 , 1 , 1 }, {1 , 0 , 1 }, {1 , 1 , 0 }};
35
37
int m = 2 ; // Number of colors
36
38
37
- assertEquals ( false , MColoring .isColoringPossible (createGraph (graph ), n , m ));
39
+ assertFalse ( MColoring .isColoringPossible (createGraph (graph ), n , m ));
38
40
}
39
41
40
42
private ArrayList <Node > createGraph (int [][] graph ) {
0 commit comments