Improved error messages

This commit is contained in:
2023-07-10 11:36:17 +02:00
parent 6b735732b5
commit c4ee12d433
7 changed files with 46 additions and 43 deletions

View File

@ -11,11 +11,7 @@ func Equal[T comparable](t testing.TB, a T, b T) {
return
}
t.Errorf(`
file: %s
assert: Equal
value: %v
expected: %v`, file(t), a, b)
t.Errorf(formatTwoParameters, file(), "Equal", a, b)
t.FailNow()
}
@ -25,10 +21,7 @@ func NotEqual[T comparable](t testing.TB, a T, b T) {
return
}
t.Errorf(`
file: %s
assert: NotEqual
value: %v`, file(t), a)
t.Errorf(formatTwoParameters, file(), "NotEqual", a, b)
t.FailNow()
}
@ -38,10 +31,6 @@ func DeepEqual[T comparable](t testing.TB, a T, b T) {
return
}
t.Errorf(`
file: %s
assert: DeepEqual
value: %v
expected: %v`, file(t), a, b)
t.Errorf(formatTwoParameters, file(), "DeepEqual", a, b)
t.FailNow()
}