Add a simple test case for tokenizer.

This commit is contained in:
Gea-Suan Lin
2024-02-16 20:59:15 +08:00
parent 57c153a6c3
commit 1de46569e8

View File

@@ -0,0 +1,14 @@
package tokenizer_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/gslin/go-ir-playground/internal/tokenizer"
)
func testTokenize(t *testing.T) {
a := tokenizer.Tokenize("test")
assert.Equal(t, len(a), 1)
assert.Equal(t, a[0], "test")
}