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

Function TestInitStatus2

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

Source from the content-addressed store, hash-verified

16 assert.Equal(t, types[2].value, "45")
17}
18func TestInitStatus2(t *testing.T) {
19 str := "age>=45"
20 types := Tokenize(str)
21 assert.Equal(t, types[0].tokenType, Identifier)
22 assert.Equal(t, types[0].value, "age")
23 assert.Equal(t, types[1].tokenType, GE)
24 assert.Equal(t, types[1].value, ">=")
25 assert.Equal(t, types[2].tokenType, IntLiteral)
26 assert.Equal(t, types[2].value, "45")
27}
28
29func TestInitStatus3(t *testing.T) {
30 str := "age>45"

Callers

nothing calls this directly

Calls 1

TokenizeFunction · 0.85

Tested by

no test coverage detected