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
64a5c803
Commit
64a5c803
authored
Mar 14, 2018
by
Adam Cozzette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed up proto3_lite_unittest.cc
parent
afe96b6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
proto3_lite_unittest.cc
src/google/protobuf/proto3_lite_unittest.cc
+11
-11
No files found.
src/google/protobuf/proto3_lite_unittest.cc
View file @
64a5c803
...
...
@@ -32,13 +32,13 @@
#include <memory>
#include <vector>
#include <google/protobuf/unittest_proto3.pb.h>
#include <google/protobuf/unittest_proto3
_lite
.pb.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/testing/googletest.h>
#include <gtest/gtest.h>
namespace
google
{
using
proto3_unittest
::
TestAllTypes
;
using
proto3_
lite_
unittest
::
TestAllTypes
;
namespace
protobuf
{
namespace
{
...
...
@@ -51,9 +51,9 @@ void SetAllFields(TestAllTypes* m) {
m
->
mutable_optional_nested_message
()
->
set_bb
(
42
);
m
->
mutable_optional_foreign_message
()
->
set_c
(
43
);
m
->
set_optional_nested_enum
(
proto3_unittest
::
TestAllTypes_NestedEnum_BAZ
);
proto3_
lite_
unittest
::
TestAllTypes_NestedEnum_BAZ
);
m
->
set_optional_foreign_enum
(
proto3_unittest
::
FOREIGN_BAZ
);
proto3_
lite_
unittest
::
FOREIGN_BAZ
);
m
->
mutable_optional_lazy_message
()
->
set_bb
(
45
);
m
->
add_repeated_int32
(
100
);
m
->
add_repeated_string
(
"asdf"
);
...
...
@@ -61,9 +61,9 @@ void SetAllFields(TestAllTypes* m) {
m
->
add_repeated_nested_message
()
->
set_bb
(
46
);
m
->
add_repeated_foreign_message
()
->
set_c
(
47
);
m
->
add_repeated_nested_enum
(
proto3_unittest
::
TestAllTypes_NestedEnum_BAZ
);
proto3_
lite_
unittest
::
TestAllTypes_NestedEnum_BAZ
);
m
->
add_repeated_foreign_enum
(
proto3_unittest
::
FOREIGN_BAZ
);
proto3_
lite_
unittest
::
FOREIGN_BAZ
);
m
->
add_repeated_lazy_message
()
->
set_bb
(
49
);
m
->
set_oneof_uint32
(
1
);
...
...
@@ -79,9 +79,9 @@ void ExpectAllFieldsSet(const TestAllTypes& m) {
EXPECT_EQ
(
42
,
m
.
optional_nested_message
().
bb
());
EXPECT_EQ
(
true
,
m
.
has_optional_foreign_message
());
EXPECT_EQ
(
43
,
m
.
optional_foreign_message
().
c
());
EXPECT_EQ
(
proto3_unittest
::
TestAllTypes_NestedEnum_BAZ
,
EXPECT_EQ
(
proto3_
lite_
unittest
::
TestAllTypes_NestedEnum_BAZ
,
m
.
optional_nested_enum
());
EXPECT_EQ
(
proto3_unittest
::
FOREIGN_BAZ
,
EXPECT_EQ
(
proto3_
lite_
unittest
::
FOREIGN_BAZ
,
m
.
optional_foreign_enum
());
EXPECT_EQ
(
true
,
m
.
has_optional_lazy_message
());
EXPECT_EQ
(
45
,
m
.
optional_lazy_message
().
bb
());
...
...
@@ -97,15 +97,15 @@ void ExpectAllFieldsSet(const TestAllTypes& m) {
EXPECT_EQ
(
1
,
m
.
repeated_foreign_message_size
());
EXPECT_EQ
(
47
,
m
.
repeated_foreign_message
(
0
).
c
());
EXPECT_EQ
(
1
,
m
.
repeated_nested_enum_size
());
EXPECT_EQ
(
proto3_unittest
::
TestAllTypes_NestedEnum_BAZ
,
EXPECT_EQ
(
proto3_
lite_
unittest
::
TestAllTypes_NestedEnum_BAZ
,
m
.
repeated_nested_enum
(
0
));
EXPECT_EQ
(
1
,
m
.
repeated_foreign_enum_size
());
EXPECT_EQ
(
proto3_unittest
::
FOREIGN_BAZ
,
EXPECT_EQ
(
proto3_
lite_
unittest
::
FOREIGN_BAZ
,
m
.
repeated_foreign_enum
(
0
));
EXPECT_EQ
(
1
,
m
.
repeated_lazy_message_size
());
EXPECT_EQ
(
49
,
m
.
repeated_lazy_message
(
0
).
bb
());
EXPECT_EQ
(
proto3_unittest
::
TestAllTypes
::
kOneofString
,
EXPECT_EQ
(
proto3_
lite_
unittest
::
TestAllTypes
::
kOneofString
,
m
.
oneof_field_case
());
EXPECT_EQ
(
"test"
,
m
.
oneof_string
());
}
...
...
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