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 7ab839e commit dd4a423Copy full SHA for dd4a423
src/test/java/com/adventofcode/flashk/common/Array2DUtilTest.java
@@ -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