Skip to content

Commit 71d4404

Browse files
committed
Add stack code
1 parent d0da3ea commit 71d4404

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/test/java/datastructure/stack/MyStackWithArrayListTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
import static org.junit.Assert.assertThat;
1010

1111
public class MyStackWithArrayListTest {
12+
13+
/*
14+
TASK
15+
ArrayList를 사용하여 Stack을 구현한다.
16+
*/
17+
1218
@Test
1319
public void test() {
1420
MyStackWithArrayList<Integer> stack = new MyStackWithArrayList<>();

src/test/java/datastructure/stack/MyStackWithArrayTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
import static org.junit.Assert.assertThat;
77

88
public class MyStackWithArrayTest {
9+
10+
/*
11+
TASK
12+
Array를 사용하여 Stack을 구현한다.
13+
*/
14+
915
@Test
1016
public void test() {
1117
MyStackWithArray stack = new MyStackWithArray();
@@ -25,7 +31,7 @@ public void test() {
2531
assertThat(stack.pop(), is(2));
2632
assertThat(stack.pop(), is(1));
2733
assertThat(stack.pop(), is(0));
28-
34+
2935
// java.lang.RuntimeException: Empty Stack!
3036
// assertThat(0, is(stack.pop()));
3137
}

0 commit comments

Comments
 (0)