We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 781ec96 commit 7eeb225Copy full SHA for 7eeb225
src/test/java/com/thealgorithms/datastructures/trees/BinaryTreeTest.java
@@ -39,9 +39,8 @@ void test2() {
39
40
BinaryTree.Node root = t.getRoot();
41
Assertions.assertNotNull(root, "Root should not be null after removals.");
42
- if (root != null) { // Additional null check for tool satisfaction
43
- Assertions.assertEquals(9, root.data);
44
- }
+ // Removed redundant null check
+ Assertions.assertEquals(9, root.data); // Check if new root is correct
45
}
46
47
// Test for attempting to remove a nonexistent node
0 commit comments