Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/protobuf/conformance/conformance_cpp.cc

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 #include <errno.h> 31 #include <errno.h>
32 #include <stdarg.h> 32 #include <stdarg.h>
33 #include <unistd.h> 33 #include <unistd.h>
34 34
35 #include "conformance.pb.h" 35 #include "conformance.pb.h"
36 #include <google/protobuf/test_messages_proto3.pb.h>
36 #include <google/protobuf/util/json_util.h> 37 #include <google/protobuf/util/json_util.h>
37 #include <google/protobuf/util/type_resolver_util.h> 38 #include <google/protobuf/util/type_resolver_util.h>
38 39
39 using conformance::ConformanceRequest; 40 using conformance::ConformanceRequest;
40 using conformance::ConformanceResponse; 41 using conformance::ConformanceResponse;
41 using conformance::TestAllTypes;
42 using google::protobuf::Descriptor; 42 using google::protobuf::Descriptor;
43 using google::protobuf::DescriptorPool; 43 using google::protobuf::DescriptorPool;
44 using google::protobuf::internal::scoped_ptr; 44 using google::protobuf::internal::scoped_ptr;
45 using google::protobuf::util::BinaryToJsonString; 45 using google::protobuf::util::BinaryToJsonString;
46 using google::protobuf::util::JsonToBinaryString; 46 using google::protobuf::util::JsonToBinaryString;
47 using google::protobuf::util::NewTypeResolverForDescriptorPool; 47 using google::protobuf::util::NewTypeResolverForDescriptorPool;
48 using google::protobuf::util::Status; 48 using google::protobuf::util::Status;
49 using google::protobuf::util::TypeResolver; 49 using google::protobuf::util::TypeResolver;
50 using protobuf_test_messages::proto3::TestAllTypes;
50 using std::string; 51 using std::string;
51 52
52 static const char kTypeUrlPrefix[] = "type.googleapis.com"; 53 static const char kTypeUrlPrefix[] = "type.googleapis.com";
53 54
54 static string GetTypeUrl(const Descriptor* message) { 55 static string GetTypeUrl(const Descriptor* message) {
55 return string(kTypeUrlPrefix) + "/" + message->full_name(); 56 return string(kTypeUrlPrefix) + "/" + message->full_name();
56 } 57 }
57 58
58 int test_count = 0; 59 int test_count = 0;
59 bool verbose = false; 60 bool verbose = false;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 kTypeUrlPrefix, DescriptorPool::generated_pool()); 199 kTypeUrlPrefix, DescriptorPool::generated_pool());
199 type_url = new string(GetTypeUrl(TestAllTypes::descriptor())); 200 type_url = new string(GetTypeUrl(TestAllTypes::descriptor()));
200 while (1) { 201 while (1) {
201 if (!DoTestIo()) { 202 if (!DoTestIo()) {
202 fprintf(stderr, "conformance-cpp: received EOF from test runner " 203 fprintf(stderr, "conformance-cpp: received EOF from test runner "
203 "after %d tests, exiting\n", test_count); 204 "after %d tests, exiting\n", test_count);
204 return 0; 205 return 0;
205 } 206 }
206 } 207 }
207 } 208 }
OLDNEW
« no previous file with comments | « third_party/protobuf/conformance/conformance.proto ('k') | third_party/protobuf/conformance/conformance_objc.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698