(t *testing.T)
| 237 | } |
| 238 | |
| 239 | func TestIntervalTree_EternalInterval(t *testing.T) { |
| 240 | tree := NewIntervalTree() |
| 241 | |
| 242 | // Insert an eternal interval (negative to positive infinity) |
| 243 | eternal := ast.EternalInterval() |
| 244 | tree.Insert(eternal) |
| 245 | |
| 246 | // Should contain any timestamp |
| 247 | tests := []int64{-1000000000000, 0, 1000000000000} |
| 248 | for _, ts := range tests { |
| 249 | count := 0 |
| 250 | tree.QueryPoint(ts, func(interval ast.Interval) error { |
| 251 | count++ |
| 252 | return nil |
| 253 | }) |
| 254 | if count != 1 { |
| 255 | t.Errorf("Eternal interval should contain timestamp %d", ts) |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | func TestTemporalStore_WithIntervalTree(t *testing.T) { |
| 261 | store := NewTemporalStore() |
nothing calls this directly
no test coverage detected