(t *testing.T, f string, args ...any)
| 62 | } |
| 63 | |
| 64 | func stackFatalf(t *testing.T, f string, args ...any) { |
| 65 | lines := make([]string, 0, 32) |
| 66 | msg := fmt.Sprintf(f, args...) |
| 67 | lines = append(lines, msg) |
| 68 | |
| 69 | // Generate the Stack of callers: Skip us and verify* frames. |
| 70 | for i := 1; true; i++ { |
| 71 | _, file, line, ok := runtime.Caller(i) |
| 72 | if !ok { |
| 73 | break |
| 74 | } |
| 75 | msg := fmt.Sprintf("%d - %s:%d", i, file, line) |
| 76 | lines = append(lines, msg) |
| 77 | } |
| 78 | t.Fatalf("%s", strings.Join(lines, "\n")) |
| 79 | } |
| 80 | |
| 81 | // Check the error channel for an error and if one is present, |
| 82 | // calls t.Fatal(e.Error()). Note that this supports tests that |
no test coverage detected