rename v1 to v01 for git tag

This commit is contained in:
bel
2023-03-24 22:27:56 -06:00
parent 1ef3afd647
commit ed2b7b7cb9
4 changed files with 16 additions and 16 deletions

View File

@@ -0,0 +1,29 @@
package button_test
import (
"mayhem-party/src/device/input/button"
"testing"
)
func TestV01(t *testing.T) {
src := constSrc(`{"T":1,"U":"bel","Y":"abc","N":"cde"}`)
t.Logf("(%v) %s", len(src), src.Read())
v01 := button.NewV01(src)
got := v01.Read()
want := []button.Button{
{Down: true, Char: 'a'},
{Down: true, Char: 'b'},
{Down: true, Char: 'c'},
{Down: false, Char: 'c'},
{Down: false, Char: 'd'},
{Down: false, Char: 'e'},
}
if len(got) != len(want) {
t.Fatal(len(want), len(got))
}
for i := range got {
if got[i] != want[i] {
t.Errorf("[%d] want %+v got %+v", i, want[i], got[i])
}
}
}