Skip to content

Commit 3b34ec6

Browse files
Merge branch 'master' into feature/digit-dp-algorithm
2 parents abc31a4 + 3ee310e commit 3b34ec6

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<dependency>
2121
<groupId>org.junit</groupId>
2222
<artifactId>junit-bom</artifactId>
23-
<version>6.0.3</version>
23+
<version>6.1.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>

src/test/java/com/thealgorithms/datastructures/bag/BagTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,9 @@ void testIterator() {
9898
@Test
9999
void testIteratorEmptyBag() {
100100
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");
101+
for (String item : bag) {
102+
org.junit.jupiter.api.Assertions.fail("Iterator returned item for an empty bag:" + item);
104103
}
105-
assertEquals(0, count, "Iterator should not traverse any items in an empty bag");
106104
}
107105

108106
@Test

0 commit comments

Comments
 (0)