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

Function TestFrameSetContextTwiceError

interpreter/frame_test.go:451–463  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

449}
450
451func TestFrameSetContextTwiceError(t *testing.T) {
452 ctx := context.Background()
453 f := mustNewExecutionFrame(t, EmptyActivation())
454 defer f.Close()
455
456 if err := f.SetContext(ctx, 1); err != nil {
457 t.Fatalf("SetContext failed first time: %v", err)
458 }
459
460 if err := f.SetContext(ctx, 1); err == nil {
461 t.Error("expected SetContext to return an error when called twice, got nil")
462 }
463}
464
465func TestFrameSetContextChildError(t *testing.T) {
466 ctx := context.Background()

Callers

nothing calls this directly

Calls 5

mustNewExecutionFrameFunction · 0.85
EmptyActivationFunction · 0.85
CloseMethod · 0.80
SetContextMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected