MCPcopy Create free account
hub / github.com/crossoverJie/gscript / TestInitStatus

Function TestInitStatus

token/token_test.go:8–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestInitStatus(t *testing.T) {
9 str := "age >= 45"
10 types := Tokenize(str)
11 assert.Equal(t, types[0].tokenType, Identifier)
12 assert.Equal(t, types[0].value, "age")
13 assert.Equal(t, types[1].tokenType, GE)
14 assert.Equal(t, types[1].value, ">=")
15 assert.Equal(t, types[2].tokenType, IntLiteral)
16 assert.Equal(t, types[2].value, "45")
17}
18func TestInitStatus2(t *testing.T) {
19 str := "age>=45"
20 types := Tokenize(str)

Callers

nothing calls this directly

Calls 1

TokenizeFunction · 0.85

Tested by

no test coverage detected