Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion exercises/practice/list-ops/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ reimplements = "be396a53-c074-4db3-8dd6-f7ed003cce7c"
description = "reverse the elements of the list -> empty list"

[fcc03d1e-42e0-4712-b689-d54ad761f360]
description = "reverse the elements of the list -> non-empty list"
description = "reverse the elements of the list -> non-empty even-length list"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the description has changed for the non-empty list, could you please also update testReversingNonEmptyList to match new description?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the existing even-length reverse test name and method to match the new description in tests.toml. I pushed the change in commit 7aab6b1 and reran .\gradlew.bat practice:list-ops:test; all tests passed.


[64d77184-5f74-4845-b158-545d2dd2df98]
description = "reverse the elements of the list -> non-empty odd-length list"

[40872990-b5b8-4cb8-9085-d91fc0d05d26]
description = "reverse the elements of the list -> list of lists is not flattened"
12 changes: 10 additions & 2 deletions exercises/practice/list-ops/src/test/java/ListOpsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,19 @@ public void testReversingEmptyList() {

@Disabled("Remove to run test")
@Test
@DisplayName("non-empty list")
public void testReversingNonEmptyList() {
@DisplayName("non-empty even-length list")
public void testReversingNonEmptyEvenLengthList() {
assertThat(ListOps.reverse(List.of('1', '3', '5', '7')))
.containsExactly('7', '5', '3', '1');
}

@Disabled("Remove to run test")
@Test
@DisplayName("reverse the elements of the list -> non-empty odd-length list")
public void testReversingNonEmptyOddLengthList() {
assertThat(ListOps.reverse(List.of(1, 3, 5, 7, 9, 11, 13)))
.containsExactly(13, 11, 9, 7, 5, 3, 1);
}

@Disabled("Remove to run test")
@Test
Expand Down
Loading