Skip to content

Commit 99891a8

Browse files
committed
Fixed sonar, added test
1 parent 12ae897 commit 99891a8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/java/g3501_3600/s3552_grid_teleportation_traversal/Solution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.util.List;
88
import java.util.Queue;
99

10-
@SuppressWarnings("unchecked")
10+
@SuppressWarnings({"java:S107", "unchecked"})
1111
public class Solution {
1212
private static final int[][] ADJACENT = new int[][] {{0, 1}, {1, 0}, {-1, 0}, {0, -1}};
1313

src/test/java/g3501_3600/s3552_grid_teleportation_traversal/SolutionTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ void minMoves2() {
1717
new Solution().minMoves(new String[] {".#...", ".#.#.", ".#.#.", "...#."}),
1818
equalTo(13));
1919
}
20+
21+
@Test
22+
void minMoves3() {
23+
assertThat(new Solution().minMoves(new String[] {".", "A"}), equalTo(1));
24+
}
2025
}

0 commit comments

Comments
 (0)