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

Function TestInterruptErrorIs

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

Source from the content-addressed store, hash-verified

2894}
2895
2896func TestInterruptErrorIs(t *testing.T) {
2897 ie := InterruptError{}
2898 tests := []struct {
2899 name string
2900 target error
2901 want bool
2902 }{
2903 {
2904 name: "same type",
2905 target: InterruptError{},
2906 want: true,
2907 },
2908 {
2909 name: "different error",
2910 target: fmt.Errorf("other error"),
2911 want: false,
2912 },
2913 }
2914 for _, tc := range tests {
2915 t.Run(tc.name, func(t *testing.T) {
2916 if got := ie.Is(tc.target); got != tc.want {
2917 t.Errorf("Is(%v) = %t, wanted %t", tc.target, got, tc.want)
2918 }
2919 })
2920 }
2921}
2922
2923func TestFolderActivation(t *testing.T) {
2924 parentAct := EmptyActivation()

Callers

nothing calls this directly

Calls 1

IsMethod · 0.95

Tested by

no test coverage detected