Tests the min and max functions in the tree.
()
| 643 | |
| 644 | |
| 645 | def test_min_max() -> bool: |
| 646 | """Tests the min and max functions in the tree.""" |
| 647 | tree = RedBlackTree(0) |
| 648 | tree.insert(-16) |
| 649 | tree.insert(16) |
| 650 | tree.insert(8) |
| 651 | tree.insert(24) |
| 652 | tree.insert(20) |
| 653 | tree.insert(22) |
| 654 | return not (tree.get_max() != 22 or tree.get_min() != -16) |
| 655 | |
| 656 | |
| 657 | def test_tree_traversal() -> bool: |
nothing calls this directly
no test coverage detected