Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
protobuf-c
Commits
ec961cb0
Commit
ec961cb0
authored
Mar 31, 2014
by
Robert Edmonds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t/: rename the required fields bitmap test case
parent
cfb919f1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
t/generated-code2/test-generated-code2.c
t/generated-code2/test-generated-code2.c
+4
-4
t/test-full.proto
t/test-full.proto
+1
-1
No files found.
t/generated-code2/test-generated-code2.c
View file @
ec961cb0
...
...
@@ -1600,15 +1600,15 @@ test_alloc_fail (void)
fields field1 and field129 with positions pos1 and pos2 (no matter what the
field numbers are), such as (pos1 % 128) == (pos2 % 128). The decoder must
return NULL instead of incomplete message with field129 missing. */
static
void
test_required_fields_bitmap
_hashing
(
void
)
static
void
test_required_fields_bitmap
(
void
)
{
const
uint8_t
source
[]
=
{
(
1
<<
3
)
|
PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED
,
sizeof
(
"hello"
)
-
1
,
'h'
,
'e'
,
'l'
,
'l'
,
'o'
};
Foo__TestRequiredFields
Hashing128
*
msg
;
msg
=
foo__test_required_fields_
hashing128
__unpack
(
NULL
,
sizeof
(
source
),
source
);
Foo__TestRequiredFields
Bitmap
*
msg
;
msg
=
foo__test_required_fields_
bitmap
__unpack
(
NULL
,
sizeof
(
source
),
source
);
assert
(
msg
==
NULL
);
}
...
...
@@ -1717,7 +1717,7 @@ static Test tests[] =
{
"test free unpacked"
,
test_alloc_free_all
},
{
"test alloc failure"
,
test_alloc_fail
},
{
"test required_fields_bitmap
128-bit hashing"
,
test_required_fields_bitmap_hashing
},
{
"test required_fields_bitmap
"
,
test_required_fields_bitmap
},
};
#define n_tests (sizeof(tests)/sizeof(Test))
...
...
t/test-full.proto
View file @
ec961cb0
...
...
@@ -222,7 +222,7 @@ message AllocValues {
required
DefaultRequiredValues
a_mess
=
5
;
}
message
TestRequiredFields
Hashing128
{
message
TestRequiredFields
Bitmap
{
required
string
field1
=
1
;
optional
string
field2
=
2
;
optional
string
field3
=
3
;
...
...
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