Skip to content

Commit f4169c4

Browse files
resolved spot bugs
1 parent d404af1 commit f4169c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/test/java/com/thealgorithms/shufflealgorithm/ConstrainedShuffleTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
44
import static org.junit.jupiter.api.Assertions.assertEquals;
5+
import static org.junit.jupiter.api.Assertions.assertTrue;
56

67
import com.thealgorithms.shufflealogrithm.ConstrainedShuffle;
78
import java.util.Arrays;
@@ -34,7 +35,7 @@ void testPreserveArrayLengthAndElements() {
3435
}
3536

3637
for (int num : arrayCopy) {
37-
assertEquals(true, originalElements.contains(num),
38+
assertTrue(originalElements.contains(num),
3839
"Array elements should be preserved");
3940
}
4041
}
@@ -91,8 +92,7 @@ void testInternalElementsShuffled() {
9192
}
9293
}
9394

94-
assertEquals(
95-
true, hasShuffled,
95+
assertTrue(hasShuffled,
9696
"Internal elements should shuffle between first and last positions");
9797
}
9898

@@ -108,5 +108,4 @@ void testArrayWithIdenticalElements() {
108108
expectedArray, identicalArray,
109109
"Array with all identical elements should remain unchanged");
110110
}
111-
}
112-
111+
}

0 commit comments

Comments
 (0)