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

Function TestValToConstantError

common/ast/conversion_test.go:716–721  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

714}
715
716func TestValToConstantError(t *testing.T) {
717 out, err := ast.ValToConstant(types.Duration{Duration: time.Duration(10)})
718 if err == nil {
719 t.Errorf("ValToConstant() got %v, wanted error", out)
720 }
721}
722
723func TestConstantToValError(t *testing.T) {
724 out, err := ast.ConstantToVal(&exprpb.Constant{})

Callers

nothing calls this directly

Calls 1

ValToConstantFunction · 0.92

Tested by

no test coverage detected