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

Function TestCalculator2

syntax/syntax_test.go:20–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18 declare.Print(Indent)
19}
20func TestCalculator2(t *testing.T) {
21 script := "int a = 2+3*5\n"
22 types := token.Tokenize(script)
23 reader := NewTokenReader(types)
24 declare, err := IntDeclare(reader)
25 assert.Nil(t, err)
26 log.Println("==============")
27 declare.Print(Indent)
28}
29func TestCalculator3(t *testing.T) {
30 script := "int a = "
31 types := token.Tokenize(script)

Callers

nothing calls this directly

Calls 5

TokenizeFunction · 0.92
NewTokenReaderFunction · 0.85
IntDeclareFunction · 0.85
NilMethod · 0.80
PrintMethod · 0.80

Tested by

no test coverage detected