Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
b7610f12
Commit
b7610f12
authored
Dec 22, 2015
by
Feng Xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing files to EXTRA_DIST.
Also delete some unused files.
parent
7f823259
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
83 additions
and
279 deletions
+83
-279
Makefile.am
Makefile.am
+48
-2
configure.ac
configure.ac
+1
-1
Makefile.am
conformance/Makefile.am
+20
-1
__init__.py
python/google/protobuf/util/__init__.py
+0
-0
setup.py
python/setup.py
+3
-2
Makefile.am
src/Makefile.am
+5
-3
test_large_enum_value.proto
src/google/protobuf/compiler/cpp/test_large_enum_value.proto
+0
-43
snake2camel_objectwriter.h
src/google/protobuf/util/internal/snake2camel_objectwriter.h
+0
-165
snake2camel_objectwriter_test.cc
...e/protobuf/util/internal/snake2camel_objectwriter_test.cc
+0
-57
message_differencer_unittest.cc
src/google/protobuf/util/message_differencer_unittest.cc
+6
-5
No files found.
Makefile.am
View file @
b7610f12
...
...
@@ -92,6 +92,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/Properties/AssemblyInfo.cs
\
csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
\
csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs
\
csharp/src/Google.Protobuf.Test/Reflection/TypeRegistryTest.cs
\
csharp/src/Google.Protobuf.Test/SampleEnum.cs
\
csharp/src/Google.Protobuf.Test/SampleMessages.cs
\
csharp/src/Google.Protobuf.Test/TestCornerCases.cs
\
...
...
@@ -159,6 +160,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf/Reflection/RepeatedFieldAccessor.cs
\
csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs
\
csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs
\
csharp/src/Google.Protobuf/Reflection/TypeRegistry.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/AnyPartial.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
\
...
...
@@ -172,8 +174,11 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/ValuePartial.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
\
csharp/src/Google.Protobuf/WellKnownTypes/WrappersPartial.cs
\
csharp/src/Google.Protobuf/WireFormat.cs
\
csharp/src/Google.Protobuf/packages.config
\
csharp/src/packages/repositories.config
java_EXTRA_DIST
=
\
...
...
@@ -652,7 +657,41 @@ ruby_EXTRA_DIST= \
ruby/tests/generated_code_test.rb
\
ruby/travis-test.sh
all_EXTRA_DIST
=
$(csharp_EXTRA_DIST)
$(java_EXTRA_DIST)
$(javanano_EXTRA_DIST)
$(objectivec_EXTRA_DIST)
$(python_EXTRA_DIST)
$(ruby_EXTRA_DIST)
js_EXTRA_DIST
=
\
js/README.md
\
js/binary/arith.js
\
js/binary/arith_test.js
\
js/binary/constants.js
\
js/binary/decoder.js
\
js/binary/decoder_test.js
\
js/binary/proto_test.js
\
js/binary/reader.js
\
js/binary/reader_test.js
\
js/binary/utils.js
\
js/binary/utils_test.js
\
js/binary/writer.js
\
js/binary/writer_test.js
\
js/data.proto
\
js/debug.js
\
js/debug_test.js
\
js/gulpfile.js
\
js/jasmine.json
\
js/message.js
\
js/message_test.js
\
js/node_loader.js
\
js/package.json
\
js/proto3_test.js
\
js/proto3_test.proto
\
js/test.proto
\
js/test2.proto
\
js/test3.proto
\
js/test4.proto
\
js/test5.proto
\
js/test_bootstrap.js
\
js/testbinary.proto
\
js/testempty.proto
all_EXTRA_DIST
=
$(csharp_EXTRA_DIST)
$(java_EXTRA_DIST)
$(javanano_EXTRA_DIST)
$(objectivec_EXTRA_DIST)
$(python_EXTRA_DIST)
$(ruby_EXTRA_DIST)
$(js_EXTRA_DIST)
EXTRA_DIST
=
$
(
@DIST_LANG@_EXTRA_DIST
)
\
autogen.sh
\
...
...
@@ -685,11 +724,18 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
examples/Makefile
\
examples/addressbook.proto
\
examples/add_person.cc
\
examples/add_person.go
\
examples/add_person_test.go
\
examples/list_people.cc
\
examples/list_people.go
\
examples/AddPerson.java
\
examples/ListPeople.java
\
examples/add_person.py
\
examples/list_people.py
examples/list_people.py
\
examples/list_people_test.go
\
protobuf.bzl
\
six.BUILD
\
util/python/BUILD
# Deletes all the files generated by autogen.sh.
MAINTAINERCLEANFILES
=
\
...
...
configure.ac
View file @
b7610f12
...
...
@@ -26,7 +26,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_ARG_VAR(DIST_LANG, [language to include in the distribution package (i.e., make dist)])
case "$DIST_LANG" in
"") DIST_LANG=all ;;
all | cpp | csharp | java | python | javanano | objectivec | ruby) ;;
all | cpp | csharp | java | python | javanano | objectivec | ruby
| js
) ;;
*) AC_MSG_FAILURE([unknown language: $DIST_LANG]) ;;
esac
AC_SUBST(DIST_LANG)
...
...
conformance/Makefile.am
View file @
b7610f12
...
...
@@ -16,8 +16,27 @@ other_language_protoc_outputs = \
bin_PROGRAMS
=
conformance-test-runner conformance-cpp
# All source files excepet C++/Objective-C ones should be explicitly listed
# here because the autoconf tools don't include files of other languages
# automatically.
EXTRA_DIST
=
\
ConformanceJava.java
\
README.md
\
conformance.proto
\
conformance_python.py
\
conformance_ruby.rb
\
failure_list_cpp.txt
\
failure_list_csharp.txt
\
failure_list_java.txt
\
failure_list_objc.txt
\
failure_list_python.txt
\
failure_list_python_cpp.txt
\
failure_list_ruby.txt
conformance_test_runner_LDADD
=
$(top_srcdir)
/src/libprotobuf.la
conformance_test_runner_SOURCES
=
conformance_test.cc conformance_test_runner.cc
\
conformance_test_runner_SOURCES
=
conformance_test.h conformance_test.cc
\
conformance_test_runner.cc
\
third_party/jsoncpp/json.h
\
third_party/jsoncpp/jsoncpp.cpp
nodist_conformance_test_runner_SOURCES
=
conformance.pb.cc
conformance_test_runner_CPPFLAGS
=
-I
$(top_srcdir)
/src
-I
$(srcdir)
...
...
python/google/protobuf/util/__init__.py
deleted
100644 → 0
View file @
7f823259
python/setup.py
View file @
b7610f12
...
...
@@ -114,7 +114,8 @@ class clean(_clean):
filepath
=
os
.
path
.
join
(
dirpath
,
filename
)
if
filepath
.
endswith
(
"_pb2.py"
)
or
filepath
.
endswith
(
".pyc"
)
or
\
filepath
.
endswith
(
".so"
)
or
filepath
.
endswith
(
".o"
)
or
\
filepath
.
endswith
(
'google/protobuf/compiler/__init__.py'
):
filepath
.
endswith
(
'google/protobuf/compiler/__init__.py'
)
or
\
filepath
.
endswith
(
'google/protobuf/util/__init__.py'
):
os
.
remove
(
filepath
)
# _clean is an old-style class, so super() doesn't work.
_clean
.
run
(
self
)
...
...
@@ -137,7 +138,7 @@ class build_py(_build_py):
GenerateUnittestProtos
()
# Make sure google.protobuf/** are valid packages.
for
path
in
[
''
,
'internal/'
,
'compiler/'
,
'pyext/'
]:
for
path
in
[
''
,
'internal/'
,
'compiler/'
,
'pyext/'
,
'util/'
]:
try
:
open
(
'google/protobuf/
%
s__init__.py'
%
path
,
'a'
)
.
close
()
except
EnvironmentError
:
...
...
src/Makefile.am
View file @
b7610f12
...
...
@@ -279,9 +279,7 @@ libprotobuf_la_SOURCES = \
google/protobuf/util/internal/protostream_objectwriter.h
\
google/protobuf/util/internal/proto_writer.cc
\
google/protobuf/util/internal/proto_writer.h
\
google/protobuf/util/internal/snake2camel_objectwriter.h
\
google/protobuf/util/internal/structured_objectwriter.h
\
google/protobuf/util/internal/testdata
\
google/protobuf/util/internal/type_info.cc
\
google/protobuf/util/internal/type_info.h
\
google/protobuf/util/internal/type_info_test_helper.cc
\
...
...
@@ -517,6 +515,7 @@ protoc_inputs = \
google/protobuf/util/internal/testdata/struct.proto
\
google/protobuf/util/internal/testdata/timestamp_duration.proto
\
google/protobuf/util/json_format_proto3.proto
\
google/protobuf/util/message_differencer_unittest.proto
\
google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
EXTRA_DIST
=
\
...
...
@@ -628,7 +627,9 @@ protoc_outputs = \
google/protobuf/util/internal/testdata/timestamp_duration.pb.cc
\
google/protobuf/util/internal/testdata/timestamp_duration.pb.h
\
google/protobuf/util/json_format_proto3.pb.cc
\
google/protobuf/util/json_format_proto3.pb.h
google/protobuf/util/json_format_proto3.pb.h
\
google/protobuf/util/message_differencer_unittest.pb.cc
\
google/protobuf/util/message_differencer_unittest.pb.h
BUILT_SOURCES
=
$(protoc_outputs)
...
...
@@ -741,6 +742,7 @@ protobuf_test_SOURCES = \
google/protobuf/util/internal/protostream_objectwriter_test.cc
\
google/protobuf/util/internal/type_info_test_helper.cc
\
google/protobuf/util/json_util_test.cc
\
google/protobuf/util/message_differencer_unittest.cc
\
google/protobuf/util/time_util_test.cc
\
google/protobuf/util/type_resolver_util_test.cc
\
$(COMMON_TEST_SOURCES)
...
...
src/google/protobuf/compiler/cpp/test_large_enum_value.proto
deleted
100644 → 0
View file @
7f823259
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Test that proto2 compiler can generate valid code when the enum value
// is INT_MAX. Note that this is a compile-only test and this proto is not
// referenced in any C++ code.
syntax
=
"proto2"
;
package
protobuf_unittest
;
message
TestLargeEnumValue
{
enum
EnumWithLargeValue
{
VALUE_1
=
1
;
VALUE_MAX
=
0x7fffffff
;
}
}
src/google/protobuf/util/internal/snake2camel_objectwriter.h
deleted
100644 → 0
View file @
7f823259
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GOOGLE_PROTOBUF_UTIL_CONVERTER_SNAKE2CAMEL_OBJECTWRITER_H__
#define GOOGLE_PROTOBUF_UTIL_CONVERTER_SNAKE2CAMEL_OBJECTWRITER_H__
#include <string>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/stringpiece.h>
#include <google/protobuf/util/internal/object_writer.h>
#include <google/protobuf/util/internal/utility.h>
namespace
google
{
namespace
protobuf
{
namespace
util
{
namespace
converter
{
// Snake2CamelObjectWriter is an ObjectWriter than translates each field name
// from snake_case to camelCase. Typical usage is:
// ProtoStreamObjectSource psos(...);
// JsonObjectWriter jow(...);
// Snake2CamelObjectWriter snake_to_camel(&jow);
// psos.writeTo(&snake_to_camel);
class
Snake2CamelObjectWriter
:
public
ObjectWriter
{
public
:
explicit
Snake2CamelObjectWriter
(
ObjectWriter
*
ow
)
:
ow_
(
ow
),
normalize_case_
(
true
)
{}
virtual
~
Snake2CamelObjectWriter
()
{}
// ObjectWriter methods.
virtual
Snake2CamelObjectWriter
*
StartObject
(
StringPiece
name
)
{
ow_
->
StartObject
(
name
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
EndObject
()
{
ow_
->
EndObject
();
return
this
;
}
virtual
Snake2CamelObjectWriter
*
StartList
(
StringPiece
name
)
{
ow_
->
StartList
(
name
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
EndList
()
{
ow_
->
EndList
();
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderBool
(
StringPiece
name
,
bool
value
)
{
ow_
->
RenderBool
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderInt32
(
StringPiece
name
,
int32
value
)
{
ow_
->
RenderInt32
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderUint32
(
StringPiece
name
,
uint32
value
)
{
ow_
->
RenderUint32
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderInt64
(
StringPiece
name
,
int64
value
)
{
ow_
->
RenderInt64
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderUint64
(
StringPiece
name
,
uint64
value
)
{
ow_
->
RenderUint64
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderDouble
(
StringPiece
name
,
double
value
)
{
ow_
->
RenderDouble
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderFloat
(
StringPiece
name
,
float
value
)
{
ow_
->
RenderFloat
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderString
(
StringPiece
name
,
StringPiece
value
)
{
ow_
->
RenderString
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderBytes
(
StringPiece
name
,
StringPiece
value
)
{
ow_
->
RenderBytes
(
name
,
value
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
RenderNull
(
StringPiece
name
)
{
ow_
->
RenderNull
(
name
);
return
this
;
}
virtual
Snake2CamelObjectWriter
*
DisableCaseNormalizationForNextKey
()
{
normalize_case_
=
false
;
return
this
;
}
private
:
ObjectWriter
*
ow_
;
bool
normalize_case_
;
bool
ShouldNormalizeCase
(
StringPiece
name
)
{
if
(
normalize_case_
)
{
return
!
IsCamel
(
name
);
}
else
{
normalize_case_
=
true
;
return
false
;
}
}
bool
IsCamel
(
StringPiece
name
)
{
return
name
.
empty
()
||
(
ascii_islower
(
name
[
0
])
&&
!
name
.
contains
(
"_"
));
}
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
(
Snake2CamelObjectWriter
);
};
}
// namespace converter
}
// namespace util
}
// namespace protobuf
}
// namespace google
#endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_SNAKE2CAMEL_OBJECTWRITER_H__
src/google/protobuf/util/internal/snake2camel_objectwriter_test.cc
deleted
100644 → 0
View file @
7f823259
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <google/protobuf/util/internal/snake2camel_objectwriter.h>
#include <google/protobuf/util/internal/expecting_objectwriter.h>
#include <gtest/gtest.h>
namespace
google
{
namespace
protobuf
{
namespace
util
{
namespace
converter
{
class
Snake2CamelObjectWriterTest
:
public
::
testing
::
Test
{
protected
:
Snake2CamelObjectWriterTest
()
:
mock_
(),
expects_
(
&
mock_
),
testing_
(
&
mock_
)
{}
virtual
~
Snake2CamelObjectWriterTest
()
{}
MockObjectWriter
mock_
;
ExpectingObjectWriter
expects_
;
Snake2CamelObjectWriter
testing_
;
};
// All tests are deleted as they are no longer needed. This file will be removed
// after the component dependecies are cleaned up.
// TODO(skarvaje): Remove this file.
}
// namespace converter
}
// namespace util
}
// namespace protobuf
}
// namespace google
src/google/protobuf/util/message_differencer_unittest.cc
View file @
b7610f12
...
...
@@ -1454,11 +1454,10 @@ static const char* const kIgnoredFields[] = {"rm.b", "rm.m.b"};
class
TestIgnorer
:
public
util
::
MessageDifferencer
::
IgnoreCriteria
{
public
:
bool
IsIgnored
(
virtual
bool
IsIgnored
(
const
Message
&
message1
,
const
Message
&
message2
,
const
FieldDescriptor
*
field
,
const
vector
<
util
::
MessageDifferencer
::
SpecificField
>&
parent_fields
)
override
{
const
vector
<
util
::
MessageDifferencer
::
SpecificField
>&
parent_fields
)
{
string
name
=
""
;
for
(
int
i
=
0
;
i
<
parent_fields
.
size
();
++
i
)
{
name
+=
parent_fields
[
i
].
field
->
name
()
+
"."
;
...
...
@@ -1500,8 +1499,10 @@ TEST(MessageDifferencerTest, TreatRepeatedFieldAsMapWithIgnoredKeyFields) {
class
ValueProductMapKeyComparator
:
public
util
::
MessageDifferencer
::
MapKeyComparator
{
public
:
virtual
bool
IsMatch
(
const
Message
&
message1
,
const
Message
&
message2
)
const
{
typedef
util
::
MessageDifferencer
::
SpecificField
SpecificField
;
virtual
bool
IsMatch
(
const
Message
&
message1
,
const
Message
&
message2
,
const
vector
<
SpecificField
>&
parent_fields
)
const
{
const
Reflection
*
reflection1
=
message1
.
GetReflection
();
const
Reflection
*
reflection2
=
message2
.
GetReflection
();
// FieldDescriptor for item.ra
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment