diff options
author | Muxi Yan <mxyan@google.com> | 2018-02-06 17:40:34 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-02-06 18:17:42 -0800 |
commit | 6f0b195d2003dbf8daf0dc31916aecac738ad45c (patch) | |
tree | de2d0a245a7e704ed552ac9157155d601aeaaea7 /test/core/compression | |
parent | 3629f1f3bc22532f4734a7388ecd4129c529534f (diff) |
Replace GRPC_COMPRESS_MESSAGE_* with GRPC_COMPRESS_*
Diffstat (limited to 'test/core/compression')
-rw-r--r-- | test/core/compression/compression_test.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/core/compression/compression_test.cc b/test/core/compression/compression_test.cc index e49a93a4b6..001591d6be 100644 --- a/test/core/compression/compression_test.cc +++ b/test/core/compression/compression_test.cc @@ -31,8 +31,8 @@ static void test_compression_algorithm_parse(void) { const char* valid_names[] = {"identity", "message/gzip", "message/deflate", "stream/gzip"}; const grpc_compression_algorithm valid_algorithms[] = { - GRPC_COMPRESS_NONE, GRPC_COMPRESS_MESSAGE_GZIP, - GRPC_COMPRESS_MESSAGE_DEFLATE, GRPC_COMPRESS_STREAM_GZIP}; + GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_DEFLATE, + GRPC_COMPRESS_STREAM_GZIP}; const char* invalid_names[] = {"gzip2", "foo", "", "2gzip"}; gpr_log(GPR_DEBUG, "test_compression_algorithm_parse"); @@ -64,8 +64,8 @@ static void test_compression_algorithm_name(void) { const char* valid_names[] = {"identity", "message/gzip", "message/deflate", "stream/gzip"}; const grpc_compression_algorithm valid_algorithms[] = { - GRPC_COMPRESS_NONE, GRPC_COMPRESS_MESSAGE_GZIP, - GRPC_COMPRESS_MESSAGE_DEFLATE, GRPC_COMPRESS_STREAM_GZIP}; + GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_DEFLATE, + GRPC_COMPRESS_STREAM_GZIP}; gpr_log(GPR_DEBUG, "test_compression_algorithm_name"); @@ -110,21 +110,21 @@ static void test_compression_algorithm_for_level(void) { /* accept only gzip */ uint32_t accepted_encodings = 0; GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_GZIP); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); GPR_ASSERT(GRPC_COMPRESS_NONE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP == + GPR_ASSERT(GRPC_COMPRESS_GZIP == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP == + GPR_ASSERT(GRPC_COMPRESS_GZIP == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP == + GPR_ASSERT(GRPC_COMPRESS_GZIP == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, accepted_encodings)); } @@ -133,21 +133,21 @@ static void test_compression_algorithm_for_level(void) { /* accept only deflate */ uint32_t accepted_encodings = 0; GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_DEFLATE); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); GPR_ASSERT(GRPC_COMPRESS_NONE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, accepted_encodings)); } @@ -156,22 +156,22 @@ static void test_compression_algorithm_for_level(void) { /* accept gzip and deflate */ uint32_t accepted_encodings = 0; GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_GZIP); - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_DEFLATE); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); GPR_ASSERT(GRPC_COMPRESS_NONE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP == + GPR_ASSERT(GRPC_COMPRESS_GZIP == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, accepted_encodings)); } @@ -203,23 +203,23 @@ static void test_compression_algorithm_for_level(void) { /* accept all algorithms */ uint32_t accepted_encodings = 0; GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_GZIP); - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_MESSAGE_DEFLATE); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_STREAM_GZIP); GPR_ASSERT(GRPC_COMPRESS_NONE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_GZIP == + GPR_ASSERT(GRPC_COMPRESS_GZIP == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, accepted_encodings)); - GPR_ASSERT(GRPC_COMPRESS_MESSAGE_DEFLATE == + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, accepted_encodings)); } |