test/sandbox/assert: wrap printf
All checks were successful
Test / Create distribution (push) Successful in 26s
Test / Fortify (push) Successful in 2m34s
Test / Data race detector (push) Successful in 3m30s
Test / Fpkg (push) Successful in 3m38s
Test / Flake checks (push) Successful in 50s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-02 18:37:46 +09:00
parent d8e9d71f87
commit 0d3652b793
3 changed files with 9 additions and 3 deletions

View File

@@ -8,9 +8,11 @@ import (
var (
assert = log.New(os.Stderr, "sandbox: ", 0)
printfFunc = assert.Printf
fatalfFunc = assert.Fatalf
)
func printf(format string, v ...any) { printfFunc(format, v...) }
func fatalf(format string, v ...any) { fatalfFunc(format, v...) }
func MustAssertMounts(name, hostMountsFile, wantFile string) {
@@ -53,7 +55,7 @@ func MustAssertMounts(name, hostMountsFile, wantFile string) {
e, &want[i])
}
assert.Printf("%s", e)
printf("%s", e)
i++
}); err != nil {
fatalf("cannot iterate mounts: %v", err)