Skip to content

Commit 4af74ae

Browse files
Ppapierskilemoncurry
authored andcommitted
Fixed issue exercism#1737 by adding a third entry into the Linked-list tests (exercism#1738)
1 parent dc0ed1f commit 4af74ae

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

exercises/linked-list/src/test/java/DoublyLinkedListTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ public void testPushPop() {
1212

1313
list.push(10);
1414
list.push(20);
15+
list.push(30);
1516

17+
assertThat(list.pop(), is(30));
1618
assertThat(list.pop(), is(20));
1719
assertThat(list.pop(), is(10));
1820
}
@@ -24,9 +26,11 @@ public void testPushShift() {
2426

2527
list.push("10");
2628
list.push("20");
29+
list.push("30");
2730

2831
assertThat(list.shift(), is("10"));
2932
assertThat(list.shift(), is("20"));
33+
assertThat(list.shift(), is("30"));
3034
}
3135

3236
@Ignore("Remove to run test")
@@ -36,7 +40,9 @@ public void testUnshiftShift() {
3640

3741
list.unshift('1');
3842
list.unshift('2');
43+
list.unshift('3');
3944

45+
assertThat(list.shift(), is('3'));
4046
assertThat(list.shift(), is('2'));
4147
assertThat(list.shift(), is('1'));
4248
}
@@ -48,9 +54,11 @@ public void testUnshiftPop() {
4854

4955
list.unshift(10);
5056
list.unshift(20);
57+
list.unshift(30);
5158

5259
assertThat(list.pop(), is(10));
5360
assertThat(list.pop(), is(20));
61+
assertThat(list.pop(), is(30));
5462
}
5563

5664
@Ignore("Remove to run test")

0 commit comments

Comments
 (0)