...

Source file src/code.rocketnine.space/tslocum/cview/util_test.go

Documentation: code.rocketnine.space/tslocum/cview

     1  package cview
     2  
     3  import (
     4  	"github.com/gdamore/tcell/v2"
     5  )
     6  
     7  // newTestApp returns a new application connected to a simulation screen.
     8  func newTestApp(root Primitive) (*Application, error) {
     9  	// Initialize simulation screen
    10  	sc := tcell.NewSimulationScreen("UTF-8")
    11  	sc.SetSize(80, 24)
    12  
    13  	// Initialize application
    14  	app := NewApplication()
    15  	app.SetScreen(sc)
    16  	app.SetRoot(root, true)
    17  
    18  	return app, nil
    19  }
    20  

View as plain text