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

Function TestCalculator

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

Source from the content-addressed store, hash-verified

9)
10
11func TestCalculator(t *testing.T) {
12 script := "int a = b+3\n"
13 types := token.Tokenize(script)
14 reader := NewTokenReader(types)
15 declare, err := IntDeclare(reader)
16 assert.Nil(t, err)
17 log.Println("==============")
18 declare.Print(Indent)
19}
20func TestCalculator2(t *testing.T) {
21 script := "int a = 2+3*5\n"
22 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