diff options
Diffstat (limited to 'test/core/surface/server_test.c')
-rw-r--r-- | test/core/surface/server_test.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index 1d5211d225..4c62d8caad 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,11 +42,19 @@ void test_register_method_fail(void) { grpc_server *server = grpc_server_create(NULL, NULL); void *method; void *method_old; - method = grpc_server_register_method(server, NULL, NULL); + method = grpc_server_register_method(server, NULL, NULL, 0); GPR_ASSERT(method == NULL); - method_old = grpc_server_register_method(server, "m", "h"); + method_old = grpc_server_register_method(server, "m", "h", 0); GPR_ASSERT(method_old != NULL); - method = grpc_server_register_method(server, "m", "h"); + method = grpc_server_register_method(server, "m", "h", 0); + GPR_ASSERT(method == NULL); + method_old = grpc_server_register_method( + server, "m2", "h2", GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST); + GPR_ASSERT(method_old != NULL); + method = grpc_server_register_method(server, "m2", "h2", 0); + GPR_ASSERT(method == NULL); + method = grpc_server_register_method( + server, "m2", "h2", GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST); GPR_ASSERT(method == NULL); grpc_server_destroy(server); } |