TestVisitExpressionTreeWithError tests error handling in tree visitor
(t *testing.T)
| 922 | |
| 923 | // TestVisitExpressionTreeWithError tests error handling in tree visitor |
| 924 | func TestVisitExpressionTreeWithError(t *testing.T) { |
| 925 | expr := &ExpressionNode{Expression: "test.expression"} |
| 926 | |
| 927 | // Test that visitor errors are propagated |
| 928 | expectedError := errors.New("test error") |
| 929 | err := VisitExpressionTree(expr, func(expr *ExpressionNode) error { |
| 930 | return expectedError |
| 931 | }) |
| 932 | |
| 933 | if !errors.Is(err, expectedError) { |
| 934 | t.Errorf("VisitExpressionTree() error = %v, expected %v", err, expectedError) |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | // TestParseExpressionIntegration tests parsing and then visiting the tree |
| 939 | func TestParseExpressionIntegration(t *testing.T) { |
nothing calls this directly
no test coverage detected