Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Aug 14, 2023
1 parent 47093a6 commit dfad27f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions expr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,12 @@ func TestOperator_struct(t *testing.T) {

func TestOperator_options_another_order(t *testing.T) {
code := `Time == "2017-10-23"`
_, err := expr.Compile(code, expr.Operator("==", "TimeEqualString"), expr.Env(&mock.Env{}))
_, err := expr.Compile(code, expr.Operator("==", "TimeEqualString"), expr.Env(mock.Env{}))
require.NoError(t, err)
}

func TestOperator_no_env(t *testing.T) {
code := `BirthDay == "2017-10-23"`
code := `Time == "2017-10-23"`
require.Panics(t, func() {
_, _ = expr.Compile(code, expr.Operator("==", "TimeEqualString"))
})
Expand All @@ -522,7 +522,7 @@ func TestOperator_interface(t *testing.T) {

program, err := expr.Compile(
code,
expr.Env(&mock.Env{}),
expr.Env(mock.Env{}),
expr.Operator("==", "StringerStringEqual", "StringStringerEqual", "StringerStringerEqual"),
expr.Operator("!=", "NotStringerStringEqual", "NotStringStringerEqual", "NotStringerStringerEqual"),
)
Expand Down

0 comments on commit dfad27f

Please sign in to comment.