Skip to content

Commit 9dc8494

Browse files
authored
Sync Zipper (#2873)
This updates the Zipper exercise to sync with the problem specifications.
1 parent e6063fc commit 9dc8494

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

exercises/practice/zipper/.meta/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
],
55
"contributors": [
66
"FridaTveit",
7+
"jagdish-15",
78
"jmrunkle",
89
"lemoncurry",
910
"msomji",

exercises/practice/zipper/.meta/tests.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[771c652e-0754-4ef0-945c-0675d12ef1f5]
613
description = "data is retained"
@@ -20,6 +27,9 @@ description = "traversing up from top"
2027
[b8505f6a-aed4-4c2e-824f-a0ed8570d74b]
2128
description = "left, right, and up"
2229

30+
[b9aa8d54-07b7-4bfd-ab6b-7ff7f35930b6]
31+
description = "test ability to descend multiple levels and return"
32+
2333
[47df1a27-b709-496e-b381-63a03b82ea5f]
2434
description = "set_value"
2535

exercises/practice/zipper/src/test/java/ZipperTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ public void testLeftRightAndUp() {
6060
assertThat(zipper.left.up.right.up.left.right.getValue()).isEqualTo(3);
6161
}
6262

63+
@Disabled("Remove to run test")
64+
@Test
65+
public void testAbilityToReturnAfterMultipleLevelDescend() {
66+
zipper = binaryTree.getRoot();
67+
assertThat(zipper.left.right.up.up.getValue()).isEqualTo(1);
68+
}
69+
6370
@Disabled("Remove to run test")
6471
@Test
6572
public void testSetValue() {

0 commit comments

Comments
 (0)