runDSL returns the DSL root resulting from running the given DSL.
(t *testing.T, dsl func())
| 25 | |
| 26 | // runDSL returns the DSL root resulting from running the given DSL. |
| 27 | func runDSL(t *testing.T, dsl func()) *expr.RootExpr { |
| 28 | root := initDSL(t) |
| 29 | require.True(t, eval.Execute(dsl, nil)) |
| 30 | require.NoError(t, eval.RunDSL()) |
| 31 | return root |
| 32 | } |
| 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) { |