Factor out testing status checks
This commit is contained in:
1 parent
d84226cc31
commit
0a5990bd6e
2 files changed
+11
-15
No files matched your search
@@ -9,3 +9,9 @@ func assertNoErr(t *testing.T, err error) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func assertStatus(t *testing.T, got int, wanted int, desc string) {
|
||||
if got != wanted {
|
||||
t.Fatalf("Expected %s %d but got %d", desc, wanted, got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user