Skip to content
Snippets Groups Projects
Commit 1563b9fe authored by Craig Tiller's avatar Craig Tiller Committed by GitHub
Browse files

Merge pull request #11191 from ctiller/hospital_food

Make cq_verifier output more readable
parents 0a7ef2d1 cc44a385
No related branches found
No related tags found
No related merge requests found
...@@ -189,10 +189,16 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) { ...@@ -189,10 +189,16 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) {
return res; return res;
} }
static bool is_probably_integer(void *p) { return ((uintptr_t)p) < 1000000; }
static void expectation_to_strvec(gpr_strvec *buf, expectation *e) { static void expectation_to_strvec(gpr_strvec *buf, expectation *e) {
char *tmp; char *tmp;
gpr_asprintf(&tmp, "%p ", e->tag); if (is_probably_integer(e->tag)) {
gpr_asprintf(&tmp, "tag(%" PRIdPTR ") ", (intptr_t)e->tag);
} else {
gpr_asprintf(&tmp, "%p ", e->tag);
}
gpr_strvec_add(buf, tmp); gpr_strvec_add(buf, tmp);
switch (e->type) { switch (e->type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment