okami.mom/ultraviolet
git clone https://git.nkp.pet/okami.mom/ultraviolet
25e48a6
main
1package uv 2 3import "testing" 4 5func TestCursorShape_Encode (t * testing.T ) { 6tests := []struct { 7shape CursorShape 8blink bool 9wantEnc int 10 }{ 11 {CursorBlock ,true ,1 }, 12 {CursorBlock ,false ,2 }, 13 {CursorUnderline ,true ,3 }, 14 {CursorUnderline ,false ,4 }, 15 {CursorBar ,true ,5 }, 16 {CursorBar ,false ,6 }, 17 } 18 19for _ ,tt := range tests { 20t .Run ("" ,func (t * testing.T ) { 21if gotEnc := tt .shape .Encode (tt .blink );gotEnc != tt .wantEnc { 22t .Errorf ("CursorShape.Encode() = %v, want %v" ,gotEnc ,tt .wantEnc ) 23 } 24 }) 25 } 26}