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

Function TestFrameSetContextChildError

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

Source from the content-addressed store, hash-verified

446}
447
448func TestFrameSetContextChildError(t *testing.T) {
449 ctx := context.Background()
450 f := mustNewExecutionFrame(t, EmptyActivation())
451 defer f.Close()
452
453 child := f.Push(EmptyActivation())
454 defer child.Pop()
455
456 if err := child.SetContext(ctx, 1); err == nil {
457 t.Error("expected SetContext on a child frame to return an error, got nil")
458 }
459}
460
461func TestNewExecutionFrameInvalidInput(t *testing.T) {
462 f, err := NewExecutionFrame(123)

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected