Skip to content

Commit 6e6108f

Browse files
authored
Improved task 864.
1 parent 968ad1e commit 6e6108f

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src.save/test/java/g0801_0900/s0864_shortest_path_to_get_all_keys/SolutionTest.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,20 @@
88
class SolutionTest {
99
@Test
1010
void shortestPathAllKeys() {
11-
Solution solution = new Solution();
1211
assertThat(
13-
solution.shortestPathAllKeys(new String[] {"@.a.#", "###.#", "b.A.B"}), equalTo(8));
12+
new Solution().shortestPathAllKeys(new String[] {"@.a.#", "###.#", "b.A.B"}),
13+
equalTo(8));
14+
}
15+
16+
@Test
17+
void shortestPathAllKeys2() {
1418
assertThat(
15-
solution.shortestPathAllKeys(new String[] {"@..aA", "..B#.", "....b"}), equalTo(6));
16-
assertThat(solution.shortestPathAllKeys(new String[] {"@Aa"}), equalTo(-1));
19+
new Solution().shortestPathAllKeys(new String[] {"@..aA", "..B#.", "....b"}),
20+
equalTo(6));
21+
}
22+
23+
@Test
24+
void shortestPathAllKeys3() {
25+
assertThat(new Solution().shortestPathAllKeys(new String[] {"@Aa"}), equalTo(-1));
1726
}
1827
}

0 commit comments

Comments
 (0)