Remove some less-necessary test helper functions
This commit is contained in:
1 parent
3cd1a17c23
commit
f6ac069bc5
3 files changed
+4
-27
No files matched your search
@@ -40,29 +40,12 @@ func AssertNoErr(t *testing.T, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
func AssertBool(t *testing.T, got, wanted bool, desc string) {
|
||||
if got != wanted {
|
||||
Fatalf(t, "Expected %s %t but got %t", desc, wanted, got)
|
||||
}
|
||||
}
|
||||
|
||||
func AssertEqualUint32(t *testing.T, got, wanted uint32, desc string) {
|
||||
if got != wanted {
|
||||
Fatalf(t, "Expected %s %d but got %d", desc, wanted, got)
|
||||
}
|
||||
}
|
||||
|
||||
func AssertEqualuint64(t *testing.T, got, wanted uint64, desc string) {
|
||||
if got != wanted {
|
||||
Fatalf(t, "Expected %s %d but got %d", desc, wanted, got)
|
||||
}
|
||||
}
|
||||
|
||||
func AssertEqualInt64(t *testing.T, got, wanted int64, desc string) {
|
||||
if got != wanted {
|
||||
Fatalf(t, "Expected %s %d but got %d", desc, wanted, got)
|
||||
}
|
||||
}
|
||||
func AssertEqualInt(t *testing.T, got, wanted int, desc string) {
|
||||
if got != wanted {
|
||||
Fatalf(t, "Expected %s %d but got %d", desc, wanted, got)
|
||||
@@ -81,12 +64,6 @@ func AssertEqualString(t *testing.T, got, wanted string, desc string) {
|
||||
}
|
||||
}
|
||||
|
||||
func AssertNotEqualString(t *testing.T, got, wanted string, desc string) {
|
||||
if got == wanted {
|
||||
Fatalf(t, "Expected %s unlike '%s'", desc, wanted)
|
||||
}
|
||||
}
|
||||
|
||||
func AssertEquals(t *testing.T, a1, a2 interface{}) {
|
||||
if !reflect.DeepEqual(a1, a2) {
|
||||
Fatalf(t, "Expected %+v == %+v", a1, a2)
|
||||
|
||||
Reference in new issue
Block a user