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
58dfce93
Commit
58dfce93
authored
Dec 03, 2014
by
Feng Xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update version number in descriptor.pb.h and plugin.pb.h. Protect death
tests with macro PROTOBUF_HAS_DEATH_TEST.
parent
81a630c6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
plugin.pb.h
src/google/protobuf/compiler/plugin.pb.h
+2
-2
descriptor.pb.h
src/google/protobuf/descriptor.pb.h
+2
-2
map_test.cc
src/google/protobuf/map_test.cc
+2
-0
repeated_field_reflection_unittest.cc
src/google/protobuf/repeated_field_reflection_unittest.cc
+2
-0
No files found.
src/google/protobuf/compiler/plugin.pb.h
View file @
58dfce93
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION <
2006
000
#if GOOGLE_PROTOBUF_VERSION <
3000
000
#error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#error your headers.
#endif
#endif
#if
2006002
< GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if
3000000
< GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/descriptor.pb.h
View file @
58dfce93
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION <
2006
000
#if GOOGLE_PROTOBUF_VERSION <
3000
000
#error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#error your headers.
#endif
#endif
#if
2006002
< GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if
3000000
< GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/map_test.cc
View file @
58dfce93
...
@@ -190,6 +190,7 @@ TEST_F(MapImplTest, MutableAt) {
...
@@ -190,6 +190,7 @@ TEST_F(MapImplTest, MutableAt) {
ExpectSingleElement
(
key
,
value2
);
ExpectSingleElement
(
key
,
value2
);
}
}
#ifdef PROTOBUF_HAS_DEATH_TEST
TEST_F
(
MapImplTest
,
MutableAtNonExistDeathTest
)
{
TEST_F
(
MapImplTest
,
MutableAtNonExistDeathTest
)
{
EXPECT_DEATH
(
map_
.
at
(
0
),
""
);
EXPECT_DEATH
(
map_
.
at
(
0
),
""
);
}
}
...
@@ -197,6 +198,7 @@ TEST_F(MapImplTest, MutableAtNonExistDeathTest) {
...
@@ -197,6 +198,7 @@ TEST_F(MapImplTest, MutableAtNonExistDeathTest) {
TEST_F
(
MapImplTest
,
ImmutableAtNonExistDeathTest
)
{
TEST_F
(
MapImplTest
,
ImmutableAtNonExistDeathTest
)
{
EXPECT_DEATH
(
const_map_
.
at
(
0
),
""
);
EXPECT_DEATH
(
const_map_
.
at
(
0
),
""
);
}
}
#endif // PROTOBUF_HAS_DEATH_TEST
TEST_F
(
MapImplTest
,
CountNonExist
)
{
TEST_F
(
MapImplTest
,
CountNonExist
)
{
EXPECT_EQ
(
0
,
map_
.
count
(
0
));
EXPECT_EQ
(
0
,
map_
.
count
(
0
));
...
...
src/google/protobuf/repeated_field_reflection_unittest.cc
View file @
58dfce93
...
@@ -410,6 +410,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) {
...
@@ -410,6 +410,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) {
EXPECT_TRUE
(
rf_message
.
empty
());
EXPECT_TRUE
(
rf_message
.
empty
());
EXPECT_TRUE
(
mrf_message
.
empty
());
EXPECT_TRUE
(
mrf_message
.
empty
());
#ifdef PROTOBUF_HAS_DEATH_TEST
// Make sure types are checked correctly at runtime.
// Make sure types are checked correctly at runtime.
const
FieldDescriptor
*
fd_optional_int32
=
const
FieldDescriptor
*
fd_optional_int32
=
desc
->
FindFieldByName
(
"optional_int32"
);
desc
->
FindFieldByName
(
"optional_int32"
);
...
@@ -419,6 +420,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) {
...
@@ -419,6 +420,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) {
message
,
fd_repeated_int32
),
""
);
message
,
fd_repeated_int32
),
""
);
EXPECT_DEATH
(
refl
->
GetRepeatedFieldRef
<
TestAllTypes
>
(
EXPECT_DEATH
(
refl
->
GetRepeatedFieldRef
<
TestAllTypes
>
(
message
,
fd_repeated_foreign_message
),
""
);
message
,
fd_repeated_foreign_message
),
""
);
#endif // PROTOBUF_HAS_DEATH_TEST
}
}
TEST
(
RepeatedFieldReflectionTest
,
RepeatedFieldRefForEnums
)
{
TEST
(
RepeatedFieldReflectionTest
,
RepeatedFieldRefForEnums
)
{
...
...
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