(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func TestTraceBuilder_EmptyEvents(t *testing.T) { |
| 290 | tb := NewTraceBuilder() |
| 291 | |
| 292 | // Empty events |
| 293 | traces := tb.BuildFromEvents([]types.AgentEventEnvelope{}) |
| 294 | if len(traces) != 0 { |
| 295 | t.Errorf("BuildFromEvents() with empty events = %v traces, want 0", len(traces)) |
| 296 | } |
| 297 | |
| 298 | // Nil root |
| 299 | root := tb.buildSpanTree(nil) |
| 300 | if root != nil { |
| 301 | t.Error("buildSpanTree(nil) should return nil") |
| 302 | } |
| 303 | |
| 304 | // Empty span tree |
| 305 | root2 := tb.buildSpanTree([]types.AgentEventEnvelope{}) |
| 306 | if root2 != nil { |
| 307 | t.Error("buildSpanTree([]) should return nil") |
| 308 | } |
| 309 | } |
nothing calls this directly
no test coverage detected