We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
count
testIteratorEmptyBag
1 parent f8232c7 commit 5588c7bCopy full SHA for 5588c7b
1 file changed
src/test/java/com/thealgorithms/datastructures/bag/BagTest.java
@@ -98,11 +98,9 @@ void testIterator() {
98
@Test
99
void testIteratorEmptyBag() {
100
Bag<String> bag = new Bag<>();
101
- int count = 0;
102
for (String ignored : bag) {
103
org.junit.jupiter.api.Assertions.fail("Iterator should not return any items for an empty bag");
104
}
105
- assertEquals(0, count, "Iterator should not traverse any items in an empty bag");
106
107
108
0 commit comments