aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/assert_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/sandbox/assert_test.go')
-rw-r--r--test/sandbox/assert_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/sandbox/assert_test.go b/test/sandbox/assert_test.go
index f2b7f99f..3727f57f 100644
--- a/test/sandbox/assert_test.go
+++ b/test/sandbox/assert_test.go
@@ -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 }