8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a26b9cc commit a811894Copy full SHA for a811894
src/test/java/com/fishercoder/_289Test.java
@@ -0,0 +1,36 @@
1
+package com.fishercoder;
2
+
3
+import com.fishercoder.solutions._289;
4
+import org.junit.BeforeClass;
5
+import org.junit.Test;
6
7
+import static org.junit.Assert.assertEquals;
8
9
+public class _289Test {
10
+ private static _289.Solution1 solution1;
11
+ private static int[][] board;
12
13
+ @BeforeClass
14
+ public static void setup() {
15
+ solution1 = new _289.Solution1();
16
+ }
17
18
+ @Test
19
+ public void test1() {
20
+ board = new int[][]{
21
+ {0, 1, 0},
22
+ {0, 0, 1},
23
+ {1, 1, 1},
24
+ {0, 0, 0}
25
+ };
26
+ solution1.gameOfLife(board);
27
+ int[][] expected = new int[][]{
28
+ {0, 0, 0},
29
+ {1, 0, 1},
30
+ {0, 1, 1},
31
+ {0, 1, 0}
32
33
+ assertEquals(expected, board);
34
35
36
+}
0 commit comments