MCPcopy Create free account
hub / github.com/cel-expr/cel-go / TestNilVariable

Function TestNilVariable

common/decls/decls_test.go:1355–1372  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1353}
1354
1355func TestNilVariable(t *testing.T) {
1356 var v *VariableDecl
1357 if v.Name() != "" {
1358 t.Errorf("v.Name() got %s, wanted ''", v.Name())
1359 }
1360 if v.Type() != nil {
1361 t.Errorf("v.Type() got %v, wanted nil", v.Type())
1362 }
1363 if v.Value() != nil {
1364 t.Errorf("v.Type() got %v, wanted nil", v.Value())
1365 }
1366 if v.Description() != "" {
1367 t.Errorf("v.Description() got %s, wanted ''", v.Description())
1368 }
1369 if v.Documentation() != nil {
1370 t.Errorf("v.Documentation() got %v, wanted nil", v.Documentation())
1371 }
1372}
1373
1374func testMerge(t *testing.T, funcs ...*FunctionDecl) *FunctionDecl {
1375 t.Helper()

Callers

nothing calls this directly

Calls 5

NameMethod · 0.95
TypeMethod · 0.95
ValueMethod · 0.95
DescriptionMethod · 0.95
DocumentationMethod · 0.95

Tested by

no test coverage detected