Add useful utilities

pull/381/head
Craig Tiller 10 years ago
parent a6347ea3e2
commit 6a60cba85e
  1. 4
      test/core/end2end/cq_verifier.c
  2. 2
      test/core/end2end/cq_verifier.h

@ -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;

@ -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__ */

Loading…
Cancel
Save