| 1 |
// Copyright (c) 2026, Maxime Soulé |
| 2 |
// All rights reserved. |
| 3 |
// |
| 4 |
// This source code is licensed under the BSD-style license found in the |
| 5 |
// LICENSE file in the root directory of this source tree. |
| 6 |
|
| 7 |
//go:build go1.27 |
| 8 |
// +build go1.27 |
| 9 |
|
| 10 |
package td_test |
| 11 |
|
| 12 |
import "fmt" |
| 13 |
|
| 14 |
func init() { |
| 15 |
// Starting go1.27, the first file of the stack trace is not |
| 16 |
// types_test.go but module_path/td/types_test.go. So as a "/" is |
| 17 |
// detected in file name, go-testdeep automatically add "This is how |
| 18 |
// we got here" paragraph. |
| 19 |
thisIsHowWeGotHere = func(line int) string { |
| 20 |
return fmt.Sprintf(` This is how we got here: |
| 21 |
TestSetlocation() td/types_test.go:%d |
| 22 |
`, line) |
| 23 |
} |
| 24 |
} |