Test that segment tree initializes correctly.
(self)
| 13 | """Test cases for the generic SegmentTree data structure.""" |
| 14 | |
| 15 | def test_initialization(self): |
| 16 | """Test that segment tree initializes correctly.""" |
| 17 | tree = SegmentTree[int](max_index=5, operation=max, default_value=0) |
| 18 | # All values should be default initially |
| 19 | for i in range(6): |
| 20 | self.assertEqual(tree.get_value(i), 0) |
| 21 | self.assertEqual(tree.query_range(0, 5), 0) |
| 22 | |
| 23 | def test_single_update_and_query(self): |
| 24 | """Test single updates and point queries.""" |
nothing calls this directly
no test coverage detected