Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
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
asn1c
Commits
75809e82
Commit
75809e82
authored
Jun 28, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
46 test case
parent
ced3ff3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
asn1c/tests/check-46.c
asn1c/tests/check-46.c
+46
-0
No files found.
asn1c/tests/check-46.c
0 → 100644
View file @
75809e82
#undef NDEBUG
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <assert.h>
#include <T.h>
uint8_t
buf1
[]
=
{
32
|
((
2
<<
6
)
+
3
),
/* [3], constructed */
5
,
((
2
<<
6
)
+
5
),
/* [5], primitive */
3
,
/* L */
'a'
,
'b'
,
'c'
,
};
static
void
check
(
uint8_t
*
buf
,
int
size
,
size_t
consumed
)
{
T_t
t
,
*
tp
;
ber_dec_rval_t
rval
;
tp
=
memset
(
&
t
,
0
,
sizeof
(
t
));
fprintf
(
stderr
,
"Buf %p
\n
"
,
buf
);
rval
=
ber_decode
(
&
asn1_DEF_T
,
(
void
**
)
&
tp
,
buf
,
size
);
fprintf
(
stderr
,
"Returned code %d, consumed %d
\n
"
,
(
int
)
rval
.
code
,
(
int
)
rval
.
consumed
);
assert
(
rval
.
code
==
RC_OK
);
assert
(
rval
.
consumed
==
consumed
);
}
int
main
(
int
ac
,
char
**
av
)
{
(
void
)
ac
;
/* Unused argument */
(
void
)
av
;
/* Unused argument */
check
(
buf1
,
sizeof
(
buf1
),
sizeof
(
buf1
));
return
0
;
}
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