diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index e7c42b1d600..80c8b23e4e4 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -166,6 +166,10 @@ static int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b) { return ok; } +int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) { + return byte_buffer_eq_slice(bb, gpr_slice_from_copied_string(str)); +} + static int string_equivalent(const char *a, const char *b) { if (a == NULL) return b == NULL || b[0] == 0; if (b == NULL) return a[0] == 0; diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index c9369128649..cf0211cd17b 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -72,4 +72,6 @@ void cq_expect_finished_with_status(cq_verifier *v, void *tag, void cq_expect_finished(cq_verifier *v, void *tag, ...); void cq_expect_server_shutdown(cq_verifier *v, void *tag); +int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string); + #endif /* __GRPC_TEST_END2END_CQ_VERIFIER_H__ */