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

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

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 months 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>
37 #include <google/protobuf/util/json_util.h> 36 #include <google/protobuf/util/json_util.h>
38 #include <google/protobuf/util/type_resolver_util.h> 37 #include <google/protobuf/util/type_resolver_util.h>
39 38
40 using conformance::ConformanceRequest; 39 using conformance::ConformanceRequest;
41 using conformance::ConformanceResponse; 40 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;
51 using std::string; 50 using std::string;
52 51
53 static const char kTypeUrlPrefix[] = "type.googleapis.com"; 52 static const char kTypeUrlPrefix[] = "type.googleapis.com";
54 53
55 static string GetTypeUrl(const Descriptor* message) { 54 static string GetTypeUrl(const Descriptor* message) {
56 return string(kTypeUrlPrefix) + "/" + message->full_name(); 55 return string(kTypeUrlPrefix) + "/" + message->full_name();
57 } 56 }
58 57
59 int test_count = 0; 58 int test_count = 0;
60 bool verbose = false; 59 bool verbose = false;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 kTypeUrlPrefix, DescriptorPool::generated_pool()); 198 kTypeUrlPrefix, DescriptorPool::generated_pool());
200 type_url = new string(GetTypeUrl(TestAllTypes::descriptor())); 199 type_url = new string(GetTypeUrl(TestAllTypes::descriptor()));
201 while (1) { 200 while (1) {
202 if (!DoTestIo()) { 201 if (!DoTestIo()) {
203 fprintf(stderr, "conformance-cpp: received EOF from test runner " 202 fprintf(stderr, "conformance-cpp: received EOF from test runner "
204 "after %d tests, exiting\n", test_count); 203 "after %d tests, exiting\n", test_count);
205 return 0; 204 return 0;
206 } 205 }
207 } 206 }
208 } 207 }
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