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

Function TestFrameSetContextTwiceError

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

Source from the content-addressed store, hash-verified

432}
433
434func TestFrameSetContextTwiceError(t *testing.T) {
435 ctx := context.Background()
436 f := mustNewExecutionFrame(t, EmptyActivation())
437 defer f.Close()
438
439 if err := f.SetContext(ctx, 1); err != nil {
440 t.Fatalf("SetContext failed first time: %v", err)
441 }
442
443 if err := f.SetContext(ctx, 1); err == nil {
444 t.Error("expected SetContext to return an error when called twice, got nil")
445 }
446}
447
448func TestFrameSetContextChildError(t *testing.T) {
449 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