MCPcopy
hub / github.com/google/go-jsonnet / TestParser

Function TestParser

internal/parser/parser_test.go:127–142  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

125}
126
127func TestParser(t *testing.T) {
128 for _, s := range tests {
129 t.Run(s, func(t *testing.T) {
130 tokens, err := Lex("test", "", s)
131 if err != nil {
132 t.Errorf("Unexpected lex error\n input: %v\n error: %v", s, err)
133 return
134 }
135 _, _, err = Parse(tokens)
136 if err != nil {
137 t.Errorf("Unexpected parse error\n input: %v\n error: %v", s, err)
138 }
139 })
140
141 }
142}
143
144type testError struct {
145 input string

Callers

nothing calls this directly

Calls 2

LexFunction · 0.85
ParseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…