MCPcopy
hub / github.com/gdamore/tcell / TestCursorStyle

Function TestCursorStyle

vt/tests/cursor_test.go:22–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func TestCursorStyle(t *testing.T) {
23 VerifyF(t, vt.SteadyBlock.IsVisible(), "steady block should be visible")
24 VerifyF(t, vt.SteadyBlock.Show() == vt.SteadyBlock, "steady block show should be non-op")
25 VerifyF(t, !vt.SteadyBlock.Hide().IsVisible(), "steady block hide should be hidden")
26 VerifyF(t, vt.SteadyBlock.Hide().Show() == vt.SteadyBlock, "steady block hide and show should be inverse")
27 VerifyF(t, !vt.SteadyBlock.IsBlinking(), "steady block should be steady")
28 VerifyF(t, vt.SteadyBlock.Blink().IsBlinking(), "steady block blink should work")
29 VerifyF(t, vt.SteadyBlock.Blink() == vt.BlinkingBlock, "steady block blink should be blinking block")
30 VerifyF(t, vt.SteadyBlock.Steady() == vt.SteadyBlock, "steady block should be steady")
31 VerifyF(t, vt.SteadyBlock.Blink().Steady() == vt.SteadyBlock, "steady block blink and steady should be inverse")
32
33 VerifyF(t, vt.SteadyBar.IsVisible(), "steady bar should be visible")
34 VerifyF(t, vt.SteadyBar.Show() == vt.SteadyBar, "steady bar show should be non-op")
35 VerifyF(t, !vt.SteadyBar.Hide().IsVisible(), "steady bar hide should be hidden")
36 VerifyF(t, vt.SteadyBar.Hide().Show() == vt.SteadyBar, "steady bar hide and show should be inverse")
37 VerifyF(t, !vt.SteadyBar.IsBlinking(), "steady bar should be steady")
38 VerifyF(t, vt.SteadyBar.Blink().IsBlinking(), "steady bar blink should work")
39 VerifyF(t, vt.SteadyBar.Blink() == vt.BlinkingBar, "steady bar blink should be blinking bar")
40 VerifyF(t, vt.SteadyBar.Steady() == vt.SteadyBar, "steady bar should be steady")
41 VerifyF(t, vt.SteadyBar.Blink().Steady() == vt.SteadyBar, "steady bar blink and steady should be inverse")
42
43 VerifyF(t, vt.SteadyUnderline.IsVisible(), "steady underline should be visible")
44 VerifyF(t, vt.SteadyUnderline.Show() == vt.SteadyUnderline, "steady underline show should be non-op")
45 VerifyF(t, !vt.SteadyUnderline.Hide().IsVisible(), "steady underline hide should be hidden")
46 VerifyF(t, vt.SteadyUnderline.Hide().Show() == vt.SteadyUnderline, "steady underline hide and show should be inverse")
47 VerifyF(t, !vt.SteadyUnderline.IsBlinking(), "steady underline should be steady")
48 VerifyF(t, vt.SteadyUnderline.Blink().IsBlinking(), "steady underline blink should work")
49 VerifyF(t, vt.SteadyUnderline.Blink() == vt.BlinkingUnderline, "steady underline blink should be blinking underline")
50 VerifyF(t, vt.SteadyUnderline.Steady() == vt.SteadyUnderline, "steady underline should be steady")
51 VerifyF(t, vt.SteadyUnderline.Blink().Steady() == vt.SteadyUnderline, "steady underline blink and steady should be inverse")
52
53 VerifyF(t, vt.BlinkingBlock.IsVisible(), "blinking block should be visible")
54 VerifyF(t, vt.BlinkingBlock.Show() == vt.BlinkingBlock, "blinking block show should be non-op")
55 VerifyF(t, !vt.BlinkingBlock.Hide().IsVisible(), "blinking block hide should be hidden")
56 VerifyF(t, vt.BlinkingBlock.Hide().Show() == vt.BlinkingBlock, "blinking block hide and show should be inverse")
57 VerifyF(t, vt.BlinkingBlock.IsBlinking(), "blinking block should be blinking")
58 VerifyF(t, vt.BlinkingBlock.Blink().IsBlinking(), "blinking block blink should work")
59 VerifyF(t, vt.BlinkingBlock.Steady() == vt.SteadyBlock, "blinking block steady should be steady block")
60 VerifyF(t, vt.BlinkingBlock.Blink() == vt.BlinkingBlock, "blinking block should be blinking block")
61 VerifyF(t, vt.BlinkingBlock.Steady().Blink() == vt.BlinkingBlock, "blinking block steady and blink should be inverse")
62
63 VerifyF(t, vt.BlinkingBar.IsVisible(), "blinking bar should be visible")
64 VerifyF(t, vt.BlinkingBar.Show() == vt.BlinkingBar, "blinking bar show should be non-op")
65 VerifyF(t, !vt.BlinkingBar.Hide().IsVisible(), "blinking bar hide should be hidden")
66 VerifyF(t, vt.BlinkingBar.Hide().Show() == vt.BlinkingBar, "blinking bar hide and show should be inverse")
67 VerifyF(t, vt.BlinkingBar.IsBlinking(), "blinking bar should be blinking")
68 VerifyF(t, vt.BlinkingBar.Blink().IsBlinking(), "blinking bar blink should work")
69 VerifyF(t, vt.BlinkingBar.Steady() == vt.SteadyBar, "blinking bar steady should be steady bar")
70 VerifyF(t, vt.BlinkingBar.Blink() == vt.BlinkingBar, "blinking bar should be blinking bar")
71 VerifyF(t, vt.BlinkingBar.Steady().Blink() == vt.BlinkingBar, "blinking bar steady and blink should be inverse")
72
73 VerifyF(t, vt.BlinkingUnderline.IsVisible(), "blinking underline should be visible")
74 VerifyF(t, vt.BlinkingUnderline.Show() == vt.BlinkingUnderline, "blinking underline show should be non-op")
75 VerifyF(t, !vt.BlinkingUnderline.Hide().IsVisible(), "blinking underline hide should be hidden")
76 VerifyF(t, vt.BlinkingUnderline.Hide().Show() == vt.BlinkingUnderline, "blinking underline hide and show should be inverse")
77 VerifyF(t, vt.BlinkingUnderline.IsBlinking(), "blinking underline should be blinking")
78 VerifyF(t, vt.BlinkingUnderline.Blink().IsBlinking(), "blinking underline blink should work")
79 VerifyF(t, vt.BlinkingUnderline.Steady() == vt.SteadyUnderline, "blinking underline steady should be steady underline")

Callers

nothing calls this directly

Calls 7

VerifyFFunction · 0.85
IsVisibleMethod · 0.80
HideMethod · 0.80
IsBlinkingMethod · 0.80
SteadyMethod · 0.80
ShowMethod · 0.65
BlinkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…