aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
Diffstat (limited to 'test/core')
-rw-r--r--test/core/end2end/cq_verifier.c1
-rw-r--r--test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c1
-rw-r--r--test/core/end2end/tests/census_simple_request.c1
-rw-r--r--test/core/fling/fling_stream_test.c1
-rw-r--r--test/core/fling/fling_test.c3
-rw-r--r--test/core/json/json_test.c1
-rw-r--r--test/core/security/credentials_test.c1
-rw-r--r--test/core/support/murmur_hash_test.c1
-rw-r--r--test/core/support/string_test.c1
-rw-r--r--test/core/surface/byte_buffer_reader_test.c30
-rw-r--r--test/core/transport/chttp2/hpack_table_test.c1
-rw-r--r--test/core/transport/chttp2/stream_encoder_test.c1
-rw-r--r--test/core/transport/chttp2/timeout_encoding_test.c1
-rw-r--r--test/core/transport/metadata_test.c1
-rw-r--r--test/core/tsi/transport_security_test.c1
15 files changed, 23 insertions, 23 deletions
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 7822d001d1..8fd6867b78 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -42,6 +42,7 @@
#include <grpc/byte_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c b/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c
index 876782df84..02aa575065 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c
+++ b/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c
@@ -48,6 +48,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
#include <grpc/support/useful.h>
diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c
index e7a8c22727..96fe4e8cec 100644
--- a/test/core/end2end/tests/census_simple_request.c
+++ b/test/core/end2end/tests/census_simple_request.c
@@ -40,6 +40,7 @@
#include <grpc/byte_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
diff --git a/test/core/fling/fling_stream_test.c b/test/core/fling/fling_stream_test.c
index 41ba995544..4d9253c0ad 100644
--- a/test/core/fling/fling_stream_test.c
+++ b/test/core/fling/fling_stream_test.c
@@ -47,6 +47,7 @@
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
+#include <grpc/support/string_util.h>
#include "test/core/util/port.h"
int main(int argc, char **argv) {
diff --git a/test/core/fling/fling_test.c b/test/core/fling/fling_test.c
index 6b07f83d5b..f9ba461d24 100644
--- a/test/core/fling/fling_test.c
+++ b/test/core/fling/fling_test.c
@@ -35,8 +35,9 @@
#include <stdio.h>
#include <grpc/support/alloc.h>
-#include <grpc/support/subprocess.h>
#include <grpc/support/host_port.h>
+#include <grpc/support/string_util.h>
+#include <grpc/support/subprocess.h>
#include "src/core/support/string.h"
#include "test/core/util/port.h"
diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c
index 9a50a6929e..3033419118 100644
--- a/test/core/json/json_test.c
+++ b/test/core/json/json_test.c
@@ -36,6 +36,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/useful.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include "src/core/json/json.h"
#include "src/core/support/string.h"
diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c
index 9a77f88e73..69ec680c18 100644
--- a/test/core/security/credentials_test.c
+++ b/test/core/security/credentials_test.c
@@ -40,6 +40,7 @@
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "test/core/util/test_config.h"
#include <openssl/rsa.h>
diff --git a/test/core/support/murmur_hash_test.c b/test/core/support/murmur_hash_test.c
index e3890a79da..2462abf7de 100644
--- a/test/core/support/murmur_hash_test.c
+++ b/test/core/support/murmur_hash_test.c
@@ -33,6 +33,7 @@
#include "src/core/support/murmur_hash.h"
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include "test/core/util/test_config.h"
#include <string.h>
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index a1692ab39f..b59082eecf 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -39,6 +39,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include "test/core/util/test_config.h"
diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c
index 9265ef16b0..c2f5fc2eb7 100644
--- a/test/core/surface/byte_buffer_reader_test.c
+++ b/test/core/surface/byte_buffer_reader_test.c
@@ -46,21 +46,10 @@
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
-static void test_create(void) {
- grpc_byte_buffer *buffer;
- grpc_byte_buffer_reader *reader;
- gpr_slice empty = gpr_empty_slice();
- LOG_TEST("test_create");
- buffer = grpc_byte_buffer_create(&empty, 1);
- reader = grpc_byte_buffer_reader_create(buffer);
- grpc_byte_buffer_reader_destroy(reader);
- grpc_byte_buffer_destroy(buffer);
-}
-
static void test_read_one_slice(void) {
gpr_slice slice;
grpc_byte_buffer *buffer;
- grpc_byte_buffer_reader *reader;
+ grpc_byte_buffer_reader reader;
gpr_slice first_slice, second_slice;
int first_code, second_code;
@@ -68,21 +57,20 @@ static void test_read_one_slice(void) {
slice = gpr_slice_from_copied_string("test");
buffer = grpc_byte_buffer_create(&slice, 1);
gpr_slice_unref(slice);
- reader = grpc_byte_buffer_reader_create(buffer);
- first_code = grpc_byte_buffer_reader_next(reader, &first_slice);
+ grpc_byte_buffer_reader_init(&reader, buffer);
+ first_code = grpc_byte_buffer_reader_next(&reader, &first_slice);
GPR_ASSERT(first_code != 0);
GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0);
gpr_slice_unref(first_slice);
- second_code = grpc_byte_buffer_reader_next(reader, &second_slice);
+ second_code = grpc_byte_buffer_reader_next(&reader, &second_slice);
GPR_ASSERT(second_code == 0);
- grpc_byte_buffer_reader_destroy(reader);
grpc_byte_buffer_destroy(buffer);
}
static void test_read_one_slice_malloc(void) {
gpr_slice slice;
grpc_byte_buffer *buffer;
- grpc_byte_buffer_reader *reader;
+ grpc_byte_buffer_reader reader;
gpr_slice first_slice, second_slice;
int first_code, second_code;
@@ -91,20 +79,18 @@ static void test_read_one_slice_malloc(void) {
memcpy(GPR_SLICE_START_PTR(slice), "test", 4);
buffer = grpc_byte_buffer_create(&slice, 1);
gpr_slice_unref(slice);
- reader = grpc_byte_buffer_reader_create(buffer);
- first_code = grpc_byte_buffer_reader_next(reader, &first_slice);
+ grpc_byte_buffer_reader_init(&reader, buffer);
+ first_code = grpc_byte_buffer_reader_next(&reader, &first_slice);
GPR_ASSERT(first_code != 0);
GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0);
gpr_slice_unref(first_slice);
- second_code = grpc_byte_buffer_reader_next(reader, &second_slice);
+ second_code = grpc_byte_buffer_reader_next(&reader, &second_slice);
GPR_ASSERT(second_code == 0);
- grpc_byte_buffer_reader_destroy(reader);
grpc_byte_buffer_destroy(buffer);
}
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
- test_create();
test_read_one_slice();
test_read_one_slice_malloc();
return 0;
diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c
index 6bc697878a..8b86e08168 100644
--- a/test/core/transport/chttp2/hpack_table_test.c
+++ b/test/core/transport/chttp2/hpack_table_test.c
@@ -39,6 +39,7 @@
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include "test/core/util/test_config.h"
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
diff --git a/test/core/transport/chttp2/stream_encoder_test.c b/test/core/transport/chttp2/stream_encoder_test.c
index 91833440cd..bf70d43e78 100644
--- a/test/core/transport/chttp2/stream_encoder_test.c
+++ b/test/core/transport/chttp2/stream_encoder_test.c
@@ -39,6 +39,7 @@
#include "src/core/transport/chttp2/hpack_parser.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include "test/core/util/parse_hexstring.h"
#include "test/core/util/slice_splitter.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/transport/chttp2/timeout_encoding_test.c b/test/core/transport/chttp2/timeout_encoding_test.c
index daaae1d39d..5bfb9cf0ec 100644
--- a/test/core/transport/chttp2/timeout_encoding_test.c
+++ b/test/core/transport/chttp2/timeout_encoding_test.c
@@ -39,6 +39,7 @@
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include "test/core/util/test_config.h"
diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c
index 9b242c5493..89deee5a40 100644
--- a/test/core/transport/metadata_test.c
+++ b/test/core/transport/metadata_test.c
@@ -39,6 +39,7 @@
#include "src/core/transport/chttp2/bin_encoder.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include "test/core/util/test_config.h"
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
diff --git a/test/core/tsi/transport_security_test.c b/test/core/tsi/transport_security_test.c
index e45602bab7..bba6744194 100644
--- a/test/core/tsi/transport_security_test.c
+++ b/test/core/tsi/transport_security_test.c
@@ -37,6 +37,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include <openssl/crypto.h>