aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/http/format_request_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/http/format_request_test.cc')
-rw-r--r--test/core/http/format_request_test.cc35
1 files changed, 16 insertions, 19 deletions
diff --git a/test/core/http/format_request_test.cc b/test/core/http/format_request_test.cc
index b2d903458d..253e59135d 100644
--- a/test/core/http/format_request_test.cc
+++ b/test/core/http/format_request_test.cc
@@ -24,14 +24,13 @@
#include "test/core/util/test_config.h"
static void test_format_get_request(void) {
- grpc_http_header hdr = {const_cast<char *>("x-yz"),
- const_cast<char *>("abc")};
+ grpc_http_header hdr = {const_cast<char*>("x-yz"), const_cast<char*>("abc")};
grpc_httpcli_request req;
grpc_slice slice;
memset(&req, 0, sizeof(req));
- req.host = const_cast<char *>("example.com");
- req.http.path = const_cast<char *>("/index.html");
+ req.host = const_cast<char*>("example.com");
+ req.http.path = const_cast<char*>("/index.html");
req.http.hdr_count = 1;
req.http.hdrs = &hdr;
@@ -50,16 +49,15 @@ static void test_format_get_request(void) {
}
static void test_format_post_request(void) {
- grpc_http_header hdr = {const_cast<char *>("x-yz"),
- const_cast<char *>("abc")};
+ grpc_http_header hdr = {const_cast<char*>("x-yz"), const_cast<char*>("abc")};
grpc_httpcli_request req;
grpc_slice slice;
char body_bytes[] = "fake body";
size_t body_len = 9;
memset(&req, 0, sizeof(req));
- req.host = const_cast<char *>("example.com");
- req.http.path = const_cast<char *>("/index.html");
+ req.host = const_cast<char*>("example.com");
+ req.http.path = const_cast<char*>("/index.html");
req.http.hdr_count = 1;
req.http.hdrs = &hdr;
@@ -81,14 +79,13 @@ static void test_format_post_request(void) {
}
static void test_format_post_request_no_body(void) {
- grpc_http_header hdr = {const_cast<char *>("x-yz"),
- const_cast<char *>("abc")};
+ grpc_http_header hdr = {const_cast<char*>("x-yz"), const_cast<char*>("abc")};
grpc_httpcli_request req;
grpc_slice slice;
memset(&req, 0, sizeof(req));
- req.host = const_cast<char *>("example.com");
- req.http.path = const_cast<char *>("/index.html");
+ req.host = const_cast<char*>("example.com");
+ req.http.path = const_cast<char*>("/index.html");
req.http.hdr_count = 1;
req.http.hdrs = &hdr;
@@ -113,13 +110,13 @@ static void test_format_post_request_content_type_override(void) {
char body_bytes[] = "fake%20body";
size_t body_len = 11;
- hdrs[0].key = const_cast<char *>("x-yz");
- hdrs[0].value = const_cast<char *>("abc");
- hdrs[1].key = const_cast<char *>("Content-Type");
- hdrs[1].value = const_cast<char *>("application/x-www-form-urlencoded");
+ hdrs[0].key = const_cast<char*>("x-yz");
+ hdrs[0].value = const_cast<char*>("abc");
+ hdrs[1].key = const_cast<char*>("Content-Type");
+ hdrs[1].value = const_cast<char*>("application/x-www-form-urlencoded");
memset(&req, 0, sizeof(req));
- req.host = const_cast<char *>("example.com");
- req.http.path = const_cast<char *>("/index.html");
+ req.host = const_cast<char*>("example.com");
+ req.http.path = const_cast<char*>("/index.html");
req.http.hdr_count = 2;
req.http.hdrs = hdrs;
@@ -140,7 +137,7 @@ static void test_format_post_request_content_type_override(void) {
grpc_slice_unref(slice);
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
test_format_get_request();