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

Function TestProtosWithExtension

ext/protos_test.go:229–239  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

227}
228
229func TestProtosWithExtension(t *testing.T) {
230 env := testProtosEnv(t)
231 _, err := env.Extend(Protos())
232 if err != nil {
233 t.Fatalf("env.Extend(Protos()) failed: %v", err)
234 }
235 _, iss := env.Compile("proto.getExt(ExampleType{}, google.expr.proto2.test.int32_ext) == 0")
236 if iss.Err() != nil {
237 t.Errorf("env.Compile() failed: %v", iss.Err())
238 }
239}
240
241func TestProtosVersion(t *testing.T) {
242 _, err := cel.NewEnv(Protos(ProtosVersion(0)))

Callers

nothing calls this directly

Calls 5

testProtosEnvFunction · 0.85
ProtosFunction · 0.85
ErrMethod · 0.80
CompileMethod · 0.65
ExtendMethod · 0.45

Tested by

no test coverage detected