MCPcopy Create free account
hub / github.com/cogentcore/core / TestEditorSetLanguage

Function TestEditorSetLanguage

texteditor/editor_test.go:31–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestEditorSetLanguage(t *testing.T) {
32 b := core.NewBody()
33 NewEditor(b).Buffer.SetLanguage(fileinfo.Go).SetString(`package main
34
35 func main() {
36 fmt.Println("Hello, world!")
37 }
38 `)
39 b.AssertRender(t, "set-lang")
40}
41
42//go:embed editor.go
43var myFile embed.FS

Callers

nothing calls this directly

Calls 5

AssertRenderMethod · 0.95
NewBodyFunction · 0.92
NewEditorFunction · 0.85
SetStringMethod · 0.65
SetLanguageMethod · 0.45

Tested by

no test coverage detected