1
0

go up the call stack for file name

This commit is contained in:
Sky Johnson 2025-05-07 07:24:57 -05:00
parent 1b0e5ea6e7
commit c20f9e7aa2

View File

@ -24,7 +24,7 @@ assert.%s
func fileInfo() (string, int) {
// Skip frames: runtime.Callers, this function, assertion function, and test helper
// This gets us to the actual test file that called the assertion
const skip = 3
const skip = 4
_, file, line, ok := runtime.Caller(skip)
if !ok {
return "unknown_file", 0