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
d89895de
Commit
d89895de
authored
Feb 25, 2017
by
Robert Edmonds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t/issue220/: Add test case for #220
parent
9c4c8f63
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
0 deletions
+50
-0
Makefile.am
Makefile.am
+16
-0
t/issue220/.gitignore
t/issue220/.gitignore
+1
-0
t/issue220/issue220.c
t/issue220/issue220.c
+13
-0
t/issue220/issue220.proto
t/issue220/issue220.proto
+20
-0
No files found.
Makefile.am
View file @
d89895de
...
...
@@ -178,6 +178,22 @@ t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto
t/generated-code2/test-full-cxx-output.inc
:
t/generated-code2/cxx-generate-packed-data$(EXEEXT)
$(AM_V_GEN)$(top_builddir)
/t/generated-code2/cxx-generate-packed-data
$(EXEEXT)
>
$(top_builddir)
/t/generated-code2/test-full-cxx-output.inc
check_PROGRAMS
+=
\
t/issue220/issue220
TESTS
+=
\
t/issue220/issue220
t_issue220_issue220_SOURCES
=
\
t/issue220/issue220.c
\
t/issue220/issue220.pb-c.c
t_issue220_issue220_LDADD
=
\
protobuf-c/libprotobuf-c.la
t/issue220/issue220.pb-c.c t/issue220/issue220.pb-c.h
:
$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue220/issue220.proto
$(AM_V_GEN)
@PROTOC@
--plugin
=
$(top_builddir)
/protoc-c/protoc-gen-c
$(EXEEXT)
-I
$(top_srcdir)
--c_out
=
$(top_builddir)
$(top_srcdir)
/t/issue220/issue220.proto
BUILT_SOURCES
+=
\
t/issue220/issue220.pb-c.c t/issue220/issue220.pb-c.h
EXTRA_DIST
+=
\
t/issue220/issue220.proto
BUILT_SOURCES
+=
\
t/test.pb-c.c t/test.pb-c.h
\
t/test-full.pb-c.c t/test-full.pb-c.h
\
...
...
t/issue220/.gitignore
0 → 100644
View file @
d89895de
issue220
t/issue220/issue220.c
0 → 100644
View file @
d89895de
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#include "t/issue220/issue220.pb-c.h"
int
main
(
void
)
{
assert
(
_MESSAGE_TYPE1__FLAG_IS_INT_SIZE
==
INT_MAX
);
assert
(
_MESSAGE_TYPE2__ANOTHER_FLAG_IS_INT_SIZE
==
INT_MAX
);
assert
(
_TOP_LEVEL_IS_INT_SIZE
==
INT_MAX
);
return
EXIT_SUCCESS
;
}
t/issue220/issue220.proto
0 → 100644
View file @
d89895de
message
TopLevel
{
oneof
submessages
{
MessageType1
type1
=
1
;
MessageType2
type2
=
2
;
}
}
message
MessageType1
{
enum
Flag
{
OK
=
1
;
}
optional
Flag
flag
=
1
;
}
message
MessageType2
{
enum
AnotherFlag
{
OK
=
1
;
}
optional
AnotherFlag
flag
=
1
;
}
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