Factor out testing status checks

This commit is contained in:
Bryan Boreham committed 2014-10-22 16:59:28 +01:00
1 parent d84226cc31
commit 0a5990bd6e
2 files changed
+11 -15

No files matched your search

+6
View File
@@ -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)
}
}