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

Function TestObservableInterpretable

interpreter/interpreter_test.go:2673–2682  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2671}
2672
2673func TestObservableInterpretable(t *testing.T) {
2674 obsInt := &ObservableInterpretable{InterpretableV2: NewConstValue(12, types.True)}
2675 if obsInt.ID() != 12 {
2676 t.Errorf("obsInt.ID() = %d, wanted 12", obsInt.ID())
2677 }
2678 res := obsInt.Eval(EmptyActivation())
2679 if res.Equal(types.True) != types.True {
2680 t.Errorf("obsInt.Eval() = %v, wanted true", res)
2681 }
2682}
2683
2684type testLegacyInterpretable struct {
2685 id int64

Callers

nothing calls this directly

Calls 5

IDMethod · 0.95
EvalMethod · 0.95
NewConstValueFunction · 0.85
EmptyActivationFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected