aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_channel/uri_parser_test.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-06 14:39:17 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-06 14:43:31 -0800
commit40422d5fa621624868280094efb2f01c2cd1352b (patch)
treecbb2baa955e11c03fa004e9e0f4f3037ba3d6150 /test/core/client_channel/uri_parser_test.cc
parentaae4ca01a315a69fcf182d09aea1efdfcda13d48 (diff)
parente759d2ad7abdb0702970eeccc5f033ff4b2a4c7f (diff)
Merge master
Diffstat (limited to 'test/core/client_channel/uri_parser_test.cc')
-rw-r--r--test/core/client_channel/uri_parser_test.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/core/client_channel/uri_parser_test.cc b/test/core/client_channel/uri_parser_test.cc
index f53cae196b..0bdf57ce4b 100644
--- a/test/core/client_channel/uri_parser_test.cc
+++ b/test/core/client_channel/uri_parser_test.cc
@@ -25,11 +25,11 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/util/test_config.h"
-static void test_succeeds(const char *uri_text, const char *scheme,
- const char *authority, const char *path,
- const char *query, const char *fragment) {
+static void test_succeeds(const char* uri_text, const char* scheme,
+ const char* authority, const char* path,
+ const char* query, const char* fragment) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_uri *uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
+ grpc_uri* uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
GPR_ASSERT(uri);
GPR_ASSERT(0 == strcmp(scheme, uri->scheme));
GPR_ASSERT(0 == strcmp(authority, uri->authority));
@@ -40,7 +40,7 @@ static void test_succeeds(const char *uri_text, const char *scheme,
grpc_uri_destroy(uri);
}
-static void test_fails(const char *uri_text) {
+static void test_fails(const char* uri_text) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
GPR_ASSERT(NULL == grpc_uri_parse(&exec_ctx, uri_text, 0));
grpc_exec_ctx_finish(&exec_ctx);
@@ -49,8 +49,8 @@ static void test_fails(const char *uri_text) {
static void test_query_parts() {
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- const char *uri_text = "http://foo/path?a&b=B&c=&#frag";
- grpc_uri *uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
+ const char* uri_text = "http://foo/path?a&b=B&c=&#frag";
+ grpc_uri* uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
GPR_ASSERT(uri);
GPR_ASSERT(0 == strcmp("http", uri->scheme));
@@ -83,8 +83,8 @@ static void test_query_parts() {
{
/* test the current behavior of multiple query part values */
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- const char *uri_text = "http://auth/path?foo=bar=baz&foobar==";
- grpc_uri *uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
+ const char* uri_text = "http://auth/path?foo=bar=baz&foobar==";
+ grpc_uri* uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
GPR_ASSERT(uri);
GPR_ASSERT(0 == strcmp("http", uri->scheme));
@@ -102,8 +102,8 @@ static void test_query_parts() {
{
/* empty query */
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- const char *uri_text = "http://foo/path";
- grpc_uri *uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
+ const char* uri_text = "http://foo/path";
+ grpc_uri* uri = grpc_uri_parse(&exec_ctx, uri_text, 0);
GPR_ASSERT(uri);
GPR_ASSERT(0 == strcmp("http", uri->scheme));
@@ -119,7 +119,7 @@ static void test_query_parts() {
}
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
test_succeeds("http://www.google.com", "http", "www.google.com", "", "", "");
test_succeeds("dns:///foo", "dns", "", "/foo", "", "");