Skip to content

Commit

Permalink
Avoid confusion by renaming method to clear list
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaltes committed May 15, 2024
1 parent e891c0b commit 06ef93c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public String toString() {
/**
* Remove all list elements
*/
public void empty() {
public void clear() {
start = null;
end = null;
length = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ void testIsEmptyOnNonEmptyList() {
list.append(0.4);
// then: the list is not empty
assertFalse(list.isEmpty());
// when: emptying the list
list.empty();
// when: clearing the list
list.clear();
// then: the list is empty again
assertTrue(list.isEmpty());
}
Expand Down

0 comments on commit 06ef93c

Please sign in to comment.