newTestInlineScreen creates an InlineScreen backed by a SimulationScreen for testing coordinate translation and size behavior.
(termWidth, termHeight, inlineHeight int)
| 13 | // newTestInlineScreen creates an InlineScreen backed by a SimulationScreen |
| 14 | // for testing coordinate translation and size behavior. |
| 15 | func newTestInlineScreen(termWidth, termHeight, inlineHeight int) (*InlineScreen, tcell.SimulationScreen) { |
| 16 | sim := tcell.NewSimulationScreen("") |
| 17 | sim.Init() |
| 18 | sim.SetSize(termWidth, termHeight) |
| 19 | |
| 20 | s := &InlineScreen{ |
| 21 | heightSpec: config.HeightSpec{Value: inlineHeight, IsPercent: false}, |
| 22 | screen: sim, |
| 23 | height: inlineHeight, |
| 24 | yOffset: termHeight - inlineHeight, |
| 25 | } |
| 26 | return s, sim |
| 27 | } |
| 28 | |
| 29 | func TestInlineScreenSize(t *testing.T) { |
| 30 | s, _ := newTestInlineScreen(80, 24, 10) |
no test coverage detected
searching dependent graphs…