Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nanopb
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
le
nanopb
Commits
62a7e4ff
Commit
62a7e4ff
authored
10 years ago
by
Petteri Aimonen
Browse files
Options
Downloads
Patches
Plain Diff
Add simple test case for message ids
parent
8c14e736
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/options/options.expected
+7
-0
7 additions, 0 deletions
tests/options/options.expected
tests/options/options.proto
+3
-0
3 additions, 0 deletions
tests/options/options.proto
with
10 additions
and
0 deletions
tests/options/options.expected
+
7
−
0
View file @
62a7e4ff
...
...
@@ -7,4 +7,11 @@ Message5_EnumValue1
} pb_packed my_packed_struct;
! skipped_field
! SkippedMessage
#define PB_MSG_103 Message3
#define PB_MSG_104 Message4
#define PB_MSG_105 Message5
#define OPTIONS_MESSAGES \\
\s+PB_MSG\(103,[0-9]*,Message3\) \\
\s+PB_MSG\(104,-1,Message4\) \\
\s+PB_MSG\(105,[0-9]*,Message5\) \\
This diff is collapsed.
Click to expand it.
tests/options/options.proto
+
3
−
0
View file @
62a7e4ff
...
...
@@ -22,12 +22,14 @@ message Message2
// Field level options
message
Message3
{
option
(
nanopb_msgopt
)
.
msgid
=
103
;
required
string
fieldsize
=
1
[(
nanopb
)
.
max_size
=
40
];
}
// Forced callback field
message
Message4
{
option
(
nanopb_msgopt
)
.
msgid
=
104
;
required
int32
int32_callback
=
1
[(
nanopb
)
.
type
=
FT_CALLBACK
];
}
...
...
@@ -47,6 +49,7 @@ message EnumTest
// Short enum names inside message
message
Message5
{
option
(
nanopb_msgopt
)
.
msgid
=
105
;
enum
Enum2
{
option
(
nanopb_enumopt
)
.
long_names
=
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment