runDSLWithError returns the DSL root and error from running the given DSL.
(t *testing.T, dsl func())
| 33 | |
| 34 | // runDSLWithError returns the DSL root and error from running the given DSL. |
| 35 | func runDSLWithError(t *testing.T, dsl func()) (*expr.RootExpr, error) { |
| 36 | root := initDSL(t) |
| 37 | require.True(t, eval.Execute(dsl, nil)) |
| 38 | err := eval.RunDSL() |
| 39 | require.Error(t, err) |
| 40 | return root, err |
| 41 | } |