|
24 | 24 | #include "bookstore.pb.h"
|
25 | 25 | #include "google/protobuf/io/zero_copy_stream.h"
|
26 | 26 | #include "google/protobuf/text_format.h"
|
27 |
| -#include "gtest/gtest.h" |
28 | 27 | #include "grpc_transcoding/type_helper.h"
|
| 28 | +#include "gtest/gtest.h" |
29 | 29 | #include "test_common.h"
|
30 | 30 |
|
31 | 31 | namespace google {
|
@@ -56,11 +56,11 @@ class ResponseToJsonTranslatorTestRun {
|
56 | 56 | // type_url - type url of messages being translated,
|
57 | 57 | // input - the input to be passed to the MessageReader,
|
58 | 58 | // expected - the expected translated json chunks as the input is processed,
|
59 |
| - ResponseToJsonTranslatorTestRun(pbutil::TypeResolver* type_resolver, |
60 |
| - bool streaming, const std::string& type_url, |
61 |
| - const pbutil::JsonPrintOptions& json_print_options, |
62 |
| - const std::string& input, |
63 |
| - const std::vector<ExpectedAt>& expected) |
| 59 | + ResponseToJsonTranslatorTestRun( |
| 60 | + pbutil::TypeResolver* type_resolver, bool streaming, |
| 61 | + const std::string& type_url, |
| 62 | + const pbutil::JsonPrintOptions& json_print_options, |
| 63 | + const std::string& input, const std::vector<ExpectedAt>& expected) |
64 | 64 | : input_(input),
|
65 | 65 | expected_(expected),
|
66 | 66 | streaming_(streaming),
|
@@ -187,10 +187,11 @@ class ResponseToJsonTranslatorTestCase {
|
187 | 187 | // type_url - type url of messages being translated,
|
188 | 188 | // input - the input to be passed to the MessageReader,
|
189 | 189 | // expected - the expected translated json chunks as the input is processed,
|
190 |
| - ResponseToJsonTranslatorTestCase(pbutil::TypeResolver* type_resolver, |
191 |
| - bool streaming, const std::string& type_url, |
192 |
| - const pbutil::JsonPrintOptions& json_print_options, |
193 |
| - std::string input, std::vector<ExpectedAt> expected) |
| 190 | + ResponseToJsonTranslatorTestCase( |
| 191 | + pbutil::TypeResolver* type_resolver, bool streaming, |
| 192 | + const std::string& type_url, |
| 193 | + const pbutil::JsonPrintOptions& json_print_options, std::string input, |
| 194 | + std::vector<ExpectedAt> expected) |
194 | 195 | : type_resolver_(type_resolver),
|
195 | 196 | streaming_(streaming),
|
196 | 197 | type_url_(type_url),
|
@@ -277,7 +278,7 @@ class ResponseToJsonTranslatorTest : public ::testing::Test {
|
277 | 278 | void SetJsonAlwaysPrintPrimitiveFields(bool always_print_primitive_fields) {
|
278 | 279 | pbutil::JsonPrintOptions json_print_options;
|
279 | 280 | json_print_options.always_print_primitive_fields =
|
280 |
| - always_print_primitive_fields; |
| 281 | + always_print_primitive_fields; |
281 | 282 | SetJsonPrintOptions(json_print_options);
|
282 | 283 | }
|
283 | 284 |
|
@@ -305,8 +306,8 @@ class ResponseToJsonTranslatorTest : public ::testing::Test {
|
305 | 306 |
|
306 | 307 | return std::unique_ptr<ResponseToJsonTranslatorTestCase>(
|
307 | 308 | new ResponseToJsonTranslatorTestCase(
|
308 |
| - type_helper_->Resolver(), streaming_, type_url_, json_print_options_, |
309 |
| - std::move(input), std::move(expected))); |
| 309 | + type_helper_->Resolver(), streaming_, type_url_, |
| 310 | + json_print_options_, std::move(input), std::move(expected))); |
310 | 311 | }
|
311 | 312 |
|
312 | 313 | private:
|
|
0 commit comments