Skip to content

Commit 8177dd1

Browse files
add test cases for 71
1 parent 72762dd commit 8177dd1

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

src/test/java/com/fishercoder/_71Test.java

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,30 @@
77
import static org.junit.Assert.assertEquals;
88

99
public class _71Test {
10-
private static _71.Solution1 solution1;
11-
12-
@BeforeClass
13-
public static void setup() {
14-
solution1 = new _71.Solution1();
15-
}
16-
17-
@Test
18-
public void test1() {
19-
assertEquals("/home", solution1.simplifyPath("/home/"));
20-
}
21-
22-
@Test
23-
public void test2() {
24-
assertEquals("/c", solution1.simplifyPath("/a/./b/../../c/"));
25-
}
10+
private static _71.Solution1 solution1;
11+
12+
@BeforeClass
13+
public static void setup() {
14+
solution1 = new _71.Solution1();
15+
}
16+
17+
@Test
18+
public void test1() {
19+
assertEquals("/home", solution1.simplifyPath("/home/"));
20+
}
21+
22+
@Test
23+
public void test2() {
24+
assertEquals("/c", solution1.simplifyPath("/a/./b/../../c/"));
25+
}
26+
27+
@Test
28+
public void test3() {
29+
assertEquals("/a/b/c", solution1.simplifyPath("/a//b////c/d//././/.."));
30+
}
31+
32+
@Test
33+
public void test4() {
34+
assertEquals("/", solution1.simplifyPath("/."));
35+
}
2636
}

0 commit comments

Comments
 (0)