Skip to content

Commit

Permalink
Check that false is returned with error
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHelmuth committed Jun 9, 2023
1 parent 387625c commit e3b0ab2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/ottl/ottlfuncs/func_is_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ func Test_IsMap_Error(t *testing.T) {
return nil, ottl.TypeError("")
},
})
_, err := exprFunc(context.Background(), nil)
result, err := exprFunc(context.Background(), nil)
assert.Equal(t, false, result)
assert.Error(t, err)
_, ok := err.(ottl.TypeError)
assert.False(t, ok)
Expand Down
3 changes: 2 additions & 1 deletion pkg/ottl/ottlfuncs/func_is_string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ func Test_IsString_Error(t *testing.T) {
return nil, ottl.TypeError("")
},
})
_, err := exprFunc(context.Background(), nil)
result, err := exprFunc(context.Background(), nil)
assert.Equal(t, false, result)
assert.Error(t, err)
_, ok := err.(ottl.TypeError)
assert.False(t, ok)
Expand Down

0 comments on commit e3b0ab2

Please sign in to comment.