(t *testing.T)
| 90 | } |
| 91 | |
| 92 | func TestServiceExprValidate(t *testing.T) { |
| 93 | cases := []struct { |
| 94 | Name string |
| 95 | DSL func() |
| 96 | Error string |
| 97 | }{ |
| 98 | {"service errors", testdata.ServiceErrorDSL, `attribute: error name "a" must be required in type "ServiceError"`}, |
| 99 | } |
| 100 | |
| 101 | for _, tc := range cases { |
| 102 | t.Run(tc.Name, func(t *testing.T) { |
| 103 | err := expr.RunInvalidDSL(t, tc.DSL) |
| 104 | assert.EqualError(t, err, tc.Error) |
| 105 | }) |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | func TestErrorExprValidate(t *testing.T) { |
| 110 | cases := []struct { |
nothing calls this directly
no test coverage detected