test/sandbox/assert: wrap printf
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
package sandbox
|
||||
|
||||
func ReplaceFatal(f func(format string, v ...any)) { fatalfFunc = f }
|
||||
type F func(format string, v ...any)
|
||||
|
||||
func SwapPrint(f F) (old F) { old = printfFunc; printfFunc = f; return }
|
||||
func SwapFatal(f F) (old F) { old = fatalfFunc; fatalfFunc = f; return }
|
||||
|
||||
Reference in New Issue
Block a user