diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-27 08:40:35 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-27 08:40:35 +0300 |
| commit | 39b40239e55ca1a80579ffa4fb6584c8f14be73a (patch) | |
| tree | 017260670dc144ab6cdc1dd6a463271ee4a26664 /internal/tui/flamegraph/renderer_test.go | |
| parent | 116526ad2836778d4d1d27298515448a0a5c53cd (diff) | |
test(flamegraph): cover height edge branches (0p)
Diffstat (limited to 'internal/tui/flamegraph/renderer_test.go')
| -rw-r--r-- | internal/tui/flamegraph/renderer_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/tui/flamegraph/renderer_test.go b/internal/tui/flamegraph/renderer_test.go index b078532..47f7d20 100644 --- a/internal/tui/flamegraph/renderer_test.go +++ b/internal/tui/flamegraph/renderer_test.go @@ -599,6 +599,12 @@ func TestBuildTerminalLayoutHeightTotalUsesSnapshotAggregation(t *testing.T) { } } +func TestSnapshotHeightTotalNilNodeReturnsZero(t *testing.T) { + if got, want := snapshotHeightTotal(nil), uint64(0); got != want { + t.Fatalf("snapshotHeightTotal(nil) = %d, want %d", got, want) + } +} + func mustFindFrame(t *testing.T, frames []tuiFrame, path string) tuiFrame { t.Helper() for _, frame := range frames { |
