aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar jtattermusch <jtattermusch@google.com>2014-12-11 12:28:56 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2014-12-11 15:11:44 -0800
commit57c6f0cadebbdf973bf560e4ad67aef8fe451bc3 (patch)
treecc0a1918d79e3ad94cf0a1cf18229e9572b0f1bf /test
parent4cd6035362461cb238e4b4dc6f4932762f1c0065 (diff)
Add batch file that builds and executes all GPR tests.
Removed bad format test to fix gpr_string_test. Also took care of some of the MS compiler warnings when compiling gpr_test_util. Change on 2014/12/11 by jtattermusch <jtattermusch@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81900639
Diffstat (limited to 'test')
-rw-r--r--test/core/end2end/cq_verifier.c2
-rw-r--r--test/core/endpoint/endpoint_tests.c8
-rw-r--r--test/core/support/string_test.c4
-rw-r--r--test/core/transport/transport_end2end_tests.c2
4 files changed, 6 insertions, 10 deletions
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index d0427da47e..4d57fdc37f 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -133,7 +133,7 @@ static void verify_and_destroy_metadata(metadata *md, grpc_metadata *elems,
gpr_free(md);
}
-static gpr_slice merge_slices(gpr_slice *slices, int nslices) {
+static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) {
size_t i;
size_t len = 0;
gpr_uint8 *cursor;
diff --git a/test/core/endpoint/endpoint_tests.c b/test/core/endpoint/endpoint_tests.c
index 8b95d6159b..f0abc30bdd 100644
--- a/test/core/endpoint/endpoint_tests.c
+++ b/test/core/endpoint/endpoint_tests.c
@@ -59,8 +59,8 @@
size_t count_and_unref_slices(gpr_slice *slices, size_t nslices,
int *current_data) {
size_t num_bytes = 0;
- int i;
- int j;
+ size_t i;
+ size_t j;
unsigned char *buf;
for (i = 0; i < nslices; ++i) {
buf = GPR_SLICE_START_PTR(slices[i]);
@@ -88,8 +88,8 @@ static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size,
size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0);
gpr_slice *slices = malloc(sizeof(gpr_slice) * nslices);
size_t num_bytes_left = num_bytes;
- int i;
- int j;
+ size_t i;
+ size_t j;
unsigned char *buf;
*num_blocks = nslices;
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index 1e8039b1e8..22ae7bacf5 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -130,10 +130,6 @@ static void test_asprintf() {
GPR_ASSERT(buf[0] == '\0');
gpr_free(buf);
- /* Print an invalid format. */
- GPR_ASSERT(gpr_asprintf(&buf, "%") == -1);
- GPR_ASSERT(buf == NULL);
-
/* Print strings of various lengths. */
for (i = 1; i < 100; i++) {
GPR_ASSERT(gpr_asprintf(&buf, "%0*d", i, 1) == i);
diff --git a/test/core/transport/transport_end2end_tests.c b/test/core/transport/transport_end2end_tests.c
index e35df3acb4..86e987bef0 100644
--- a/test/core/transport/transport_end2end_tests.c
+++ b/test/core/transport/transport_end2end_tests.c
@@ -700,7 +700,7 @@ static void end_test(test_fixture *f) {
/* Generate a test slice filled with {0,1,2,3,...,255,0,1,2,3,4,...} */
static gpr_slice generate_test_data(size_t length) {
gpr_slice slice = gpr_slice_malloc(length);
- int i;
+ size_t i;
for (i = 0; i < length; i++) {
GPR_SLICE_START_PTR(slice)[i] = i;
}