MCPcopy Create free account
hub / github.com/goadesign/goa / runDSLWithError

Function runDSLWithError

codegen/service/testing.go:35–41  ·  view source on GitHub ↗

runDSLWithError returns the DSL root and error from running the given DSL.

(t *testing.T, dsl func())

Source from the content-addressed store, hash-verified

33
34// runDSLWithError returns the DSL root and error from running the given DSL.
35func 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}

Callers 1

TestInvalidInterceptorsFunction · 0.85

Calls 4

ExecuteFunction · 0.92
RunDSLFunction · 0.92
initDSLFunction · 0.85
ErrorMethod · 0.45

Tested by 1

TestInvalidInterceptorsFunction · 0.68