(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestAddEvent_NoCacheWhenWidthZero(t *testing.T) { |
| 50 | lv := NewLogViewer() |
| 51 | // Width is 0 (default) |
| 52 | |
| 53 | lv.AddEvent(makeTextEvent("Hello world")) |
| 54 | |
| 55 | if len(lv.entries) != 1 { |
| 56 | t.Fatalf("Expected 1 entry, got %d", len(lv.entries)) |
| 57 | } |
| 58 | if len(lv.entries[0].cachedLines) != 0 { |
| 59 | t.Error("Expected cachedLines to be empty when width is 0") |
| 60 | } |
| 61 | if lv.totalLineCount != 0 { |
| 62 | t.Errorf("Expected totalLineCount 0, got %d", lv.totalLineCount) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func TestAddEvent_FiltersUnwantedEvents(t *testing.T) { |
| 67 | lv := NewLogViewer() |
nothing calls this directly
no test coverage detected