(t *testing.T, fn func())
| 121 | func (e *runDSLExpr) Validate() error { return e.validate } |
| 122 | |
| 123 | func dslDeclLocation(t *testing.T, fn func()) (file string, line int) { |
| 124 | t.Helper() |
| 125 | |
| 126 | pc := reflect.ValueOf(fn).Pointer() |
| 127 | f := runtime.FuncForPC(pc) |
| 128 | if f == nil { |
| 129 | t.Fatal("runtime.FuncForPC returned nil") |
| 130 | } |
| 131 | file, line = f.FileLine(pc) |
| 132 | return relativeToWorkdir(t, file), line |
| 133 | } |
no test coverage detected