DataHoarder
f605079083
All checks were successful
continuous-integration/drone/push Build is passing
31 lines
497 B
Go
31 lines
497 B
Go
package testingutils
|
|
|
|
import (
|
|
"git.gammaspectra.live/S.O.N.G/Ignite/utilities"
|
|
"testing"
|
|
)
|
|
|
|
type testingLogger struct {
|
|
*testing.T
|
|
}
|
|
|
|
func (t testingLogger) Panic(v ...any) {
|
|
t.Fatal(v...)
|
|
}
|
|
|
|
func (t testingLogger) Panicf(format string, v ...any) {
|
|
t.Fatalf(format, v...)
|
|
}
|
|
|
|
func (t testingLogger) Print(v ...any) {
|
|
t.Log(v...)
|
|
}
|
|
|
|
func (t testingLogger) Printf(format string, v ...any) {
|
|
t.Logf(format, v...)
|
|
}
|
|
|
|
func TestLogger(t *testing.T) utilities.Logger {
|
|
return &testingLogger{t}
|
|
}
|