Skip to content

Commit dd4a423

Browse files
committed
test: add Array2DUtil test
1 parent 7ab839e commit dd4a423

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.adventofcode.flashk.common;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
import static org.junit.jupiter.api.Assertions.*;
6+
7+
class Array2DUtilTest {
8+
9+
@Test
10+
void transposeTest() {
11+
char[][] array = {
12+
{'a', 'b', 'c'},
13+
{'d', 'e', 'f'},
14+
{'g', 'h', 'i'}
15+
};
16+
17+
char[][] expected = {
18+
{'a', 'd', 'g'},
19+
{'b', 'e', 'h'},
20+
{'c', 'f', 'i'}
21+
};
22+
23+
char[][] actual = Array2DUtil.transpose(array);
24+
25+
assertArrayEquals(expected, actual);
26+
}
27+
}

0 commit comments

Comments
 (0)