func commit(t *testing.T, cli *eyes.Client, hash string) { res := cli.CommitSync() if res.IsErr() { t.Error("Unexpected error getting hash", res.Error()) } if hash != Fmt("%X", res.Data) { t.Errorf("Expected hash 0x%v but got 0x%X", hash, res.Data) } }