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

Function TestFrameSetContextTwiceError

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

Source from the content-addressed store, hash-verified

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