Add a simple test case for tokenizer.
This commit is contained in:
14
internal/tokenizer/tokenize_test.go
Normal file
14
internal/tokenizer/tokenize_test.go
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user