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

Function TestSimpleNull

internal/program/static_analyzer_test.go:25–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestSimpleNull(t *testing.T) {
26 ast := &ast.LiteralNull{}
27 err := analyze(ast)
28 if err != nil {
29 t.Errorf("Unexpected error: %+v", err)
30 }
31 if len(ast.FreeVariables()) != 0 {
32 t.Errorf("Unexpected free variabled %+v", ast.FreeVariables())
33 }
34}
35
36func hasTheseFreeVars(returned ast.Identifiers, expected ast.Identifiers) bool {
37 if len(returned) != len(expected) {

Callers

nothing calls this directly

Calls 2

analyzeFunction · 0.85
FreeVariablesMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…