Skip to content

Commit 738da0b

Browse files
committed
Remove ExampleDisableShortCircuit test function
1 parent eb73788 commit 738da0b

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

expr_test.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,33 +2888,6 @@ func TestIssue807(t *testing.T) {
28882888
}
28892889
}
28902890

2891-
func ExampleDisableShortCircuit() {
2892-
OR := func(a, b bool) bool {
2893-
return a || b
2894-
}
2895-
2896-
env := map[string]any{
2897-
"foo": func() bool {
2898-
fmt.Println("foo")
2899-
return false
2900-
},
2901-
"bar": func() bool {
2902-
fmt.Println("bar")
2903-
return false
2904-
},
2905-
"OR": OR,
2906-
}
2907-
2908-
program, _ := expr.Compile("true || foo() or bar()", expr.Env(env), expr.Operator("or", "OR"), expr.Operator("||", "OR"))
2909-
got, _ := expr.Run(program, env)
2910-
fmt.Println(got)
2911-
2912-
// Output:
2913-
// foo
2914-
// bar
2915-
// true
2916-
}
2917-
29182891
func TestDisableShortCircuit(t *testing.T) {
29192892
count := 0
29202893
exprStr := "foo() or bar()"

0 commit comments

Comments
 (0)