File: text_test.go

package info (click to toggle)
golang-github-gdamore-tcell.v2 2.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,064 kB
  • sloc: javascript: 219; sh: 16; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 240 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package views

import "testing"

func TestText(t *testing.T) {
	text := &Text{}

	text.SetText(`
This
String
Is
Pretty
Long
12345678901234567890
`)
	if text.width != 20 {
		t.Errorf("Incorrect width: %d, expected: %d", text.width, 20)
	}
}