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

Function TestInitStatus3

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

Source from the content-addressed store, hash-verified

27}
28
29func TestInitStatus3(t *testing.T) {
30 str := "age>45"
31 types := Tokenize(str)
32 assert.Equal(t, types[0].tokenType, Identifier)
33 assert.Equal(t, types[0].value, "age")
34 assert.Equal(t, types[1].tokenType, GT)
35 assert.Equal(t, types[1].value, ">")
36 assert.Equal(t, types[2].tokenType, IntLiteral)
37 assert.Equal(t, types[2].value, "45")
38}
39func TestInitStatus4(t *testing.T) {
40 str := "age > 45"
41 types := Tokenize(str)

Callers

nothing calls this directly

Calls 1

TokenizeFunction · 0.85

Tested by

no test coverage detected