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
cef21e07
Commit
cef21e07
authored
Oct 09, 2017
by
Vasil Velichkov
Committed by
Lev Walkin
Oct 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several memory leaks in the tests
parent
5532a1d6
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
70 additions
and
8 deletions
+70
-8
tests/tests-c-compiler/check-src/check-03.-fwide-types.c
tests/tests-c-compiler/check-src/check-03.-fwide-types.c
+2
-0
tests/tests-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
...ts-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
+1
-0
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
+2
-0
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
+6
-1
tests/tests-c-compiler/check-src/check-127.-gen-PER.c
tests/tests-c-compiler/check-src/check-127.-gen-PER.c
+2
-0
tests/tests-c-compiler/check-src/check-131.-gen-PER.c
tests/tests-c-compiler/check-src/check-131.-gen-PER.c
+1
-0
tests/tests-c-compiler/check-src/check-132.-gen-PER.c
tests/tests-c-compiler/check-src/check-132.-gen-PER.c
+2
-0
tests/tests-c-compiler/check-src/check-135.-gen-OER.c
tests/tests-c-compiler/check-src/check-135.-gen-OER.c
+2
-0
tests/tests-c-compiler/check-src/check-148.c
tests/tests-c-compiler/check-src/check-148.c
+3
-0
tests/tests-c-compiler/check-src/check-22.-fwide-types.c
tests/tests-c-compiler/check-src/check-22.-fwide-types.c
+3
-0
tests/tests-c-compiler/check-src/check-24.-fwide-types.c
tests/tests-c-compiler/check-src/check-24.-fwide-types.c
+2
-0
tests/tests-c-compiler/check-src/check-30.-fwide-types.c
tests/tests-c-compiler/check-src/check-30.-fwide-types.c
+3
-0
tests/tests-c-compiler/check-src/check-31.-fwide-types.c
tests/tests-c-compiler/check-src/check-31.-fwide-types.c
+3
-0
tests/tests-c-compiler/check-src/check-32.c
tests/tests-c-compiler/check-src/check-32.c
+7
-0
tests/tests-c-compiler/check-src/check-35.c
tests/tests-c-compiler/check-src/check-35.c
+2
-0
tests/tests-c-compiler/check-src/check-46.c
tests/tests-c-compiler/check-src/check-46.c
+1
-0
tests/tests-c-compiler/check-src/check-48.c
tests/tests-c-compiler/check-src/check-48.c
+2
-0
tests/tests-c-compiler/check-src/check-60.c
tests/tests-c-compiler/check-src/check-60.c
+9
-6
tests/tests-c-compiler/check-src/check-65.c
tests/tests-c-compiler/check-src/check-65.c
+1
-0
tests/tests-c-compiler/check-src/check-70.-fwide-types.c
tests/tests-c-compiler/check-src/check-70.-fwide-types.c
+1
-0
tests/tests-c-compiler/check-src/check-70.c
tests/tests-c-compiler/check-src/check-70.c
+1
-0
tests/tests-c-compiler/check-src/check64-134.-gen-PER.c
tests/tests-c-compiler/check-src/check64-134.-gen-PER.c
+12
-0
tests/tests-c-compiler/check-src/check64-136.-gen-OER.c
tests/tests-c-compiler/check-src/check64-136.-gen-OER.c
+2
-1
No files found.
tests/tests-c-compiler/check-src/check-03.-fwide-types.c
View file @
cef21e07
...
...
@@ -45,6 +45,8 @@ check_xer(e_Enum2 eval, char *xer_string) {
sprintf
(
buf2
,
"<Enum2>%s</Enum2>"
,
xer_string
);
printf
(
"%d -> %s == %s
\n
"
,
eval
,
buf
,
buf2
);
assert
(
0
==
strcmp
(
buf
,
buf2
));
ASN_STRUCT_FREE
(
asn_DEF_Enum2
,
e
);
}
int
...
...
tests/tests-c-compiler/check-src/check-119.-fwide-types.-gen-PER.c
View file @
cef21e07
...
...
@@ -249,6 +249,7 @@ process_XER_data(const char *fname, enum expectation expectation, unsigned char
/* Save and re-load as PER */
save_object_as
(
st
,
expectation
,
AS_PER
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
if
(
expectation
==
EXP_PER_NOCOMP
)
return
;
/* Already checked */
st
=
load_object_from
(
"buffer"
,
expectation
,
buf
,
buf_offset
,
AS_PER
);
...
...
tests/tests-c-compiler/check-src/check-119.-gen-PER.c
View file @
cef21e07
...
...
@@ -251,6 +251,8 @@ process_XER_data(const char *fname, enum expectation expectation, unsigned char
/* Save and re-load as PER */
save_object_as
(
st
,
expectation
,
AS_PER
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
if
(
expectation
==
EXP_PER_NOCOMP
)
return
;
/* Already checked */
st
=
load_object_from
(
"buffer"
,
expectation
,
buf
,
buf_offset
,
AS_PER
);
...
...
tests/tests-c-compiler/check-src/check-126.-gen-PER.c
View file @
cef21e07
...
...
@@ -150,6 +150,7 @@ load_object_from(const char *fname, unsigned char *fbuf, size_t size, enum encty
rval
.
consumed
/=
8
;
if
(
mustfail
)
{
fprintf
(
stderr
,
"-> (this was expected failure)
\n
"
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
return
0
;
}
}
else
{
...
...
@@ -167,6 +168,7 @@ load_object_from(const char *fname, unsigned char *fbuf, size_t size, enum encty
if
((
mustfail
?
1
:
0
)
==
(
rval
.
code
==
RC_FAIL
))
{
if
(
mustfail
)
{
fprintf
(
stderr
,
"-> (this was expected failure)
\n
"
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
return
0
;
}
}
else
{
...
...
@@ -246,6 +248,7 @@ compare_with_data_out(const char *fname, void *datap, size_t size) {
FILE
*
f
;
char
lastChar
;
int
mustfail
,
compare
;
PDU_t
*
st
;
sprintf
(
outName
,
SRCDIR_S
"/data-126/%s"
,
fname
);
strcpy
(
outName
+
strlen
(
outName
)
-
3
,
".out"
);
...
...
@@ -268,7 +271,8 @@ compare_with_data_out(const char *fname, void *datap, size_t size) {
fclose
(
f
);
fprintf
(
stderr
,
"Trying to decode [%s]
\n
"
,
outName
);
load_object_from
(
outName
,
fbuf
,
rd
,
AS_PER
,
mustfail
);
st
=
load_object_from
(
outName
,
fbuf
,
rd
,
AS_PER
,
mustfail
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
if
(
mustfail
)
return
;
if
(
compare
)
{
...
...
@@ -291,6 +295,7 @@ process_XER_data(const char *fname, unsigned char *fbuf, size_t size) {
/* Save and re-load as PER */
save_object_as
(
st
,
AS_PER
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
compare_with_data_out
(
fname
,
buf
,
buf_offset
);
st
=
load_object_from
(
"buffer"
,
buf
,
buf_offset
,
AS_PER
,
0
);
assert
(
st
);
...
...
tests/tests-c-compiler/check-src/check-127.-gen-PER.c
View file @
cef21e07
...
...
@@ -42,6 +42,8 @@ verify(int testNo, T_t *ti) {
xer_fprint
(
stderr
,
&
asn_DEF_T
,
ti
);
xer_fprint
(
stderr
,
&
asn_DEF_T
,
to
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
to
);
}
int
main
()
{
...
...
tests/tests-c-compiler/check-src/check-131.-gen-PER.c
View file @
cef21e07
...
...
@@ -55,5 +55,6 @@ main() {
||
(
pd
.
nboff
==
16
&&
pd
.
buffer
==
&
po
.
tmpspace
[
0
]));
assert
(
pd
.
nboff
+
pd
.
nbits
==
16
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
t2
);
return
0
;
}
tests/tests-c-compiler/check-src/check-132.-gen-PER.c
View file @
cef21e07
...
...
@@ -36,6 +36,8 @@ verify(int testNo, T_t *ti) {
xer_fprint
(
stderr
,
&
asn_DEF_T
,
ti
);
xer_fprint
(
stderr
,
&
asn_DEF_T
,
to
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
to
);
}
int
main
()
{
...
...
tests/tests-c-compiler/check-src/check-135.-gen-OER.c
View file @
cef21e07
...
...
@@ -36,6 +36,8 @@ int main() {
return
1
;
}
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
source
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
decoded
);
return
0
;
}
tests/tests-c-compiler/check-src/check-148.c
View file @
cef21e07
...
...
@@ -139,6 +139,8 @@ check_sequence(uint8_t *in, size_t in_size, uint8_t *expected,
buf2_pos
=
0
;
erval
=
der_encode
(
&
asn_DEF_DefaultSequence
,
tp
,
buf2_fill
,
0
);
compare_encoding
(
&
erval
,
expected
,
expected_size
,
buf2
);
ASN_STRUCT_RESET
(
asn_DEF_DefaultSequence
,
tp
);
}
static
void
...
...
@@ -160,6 +162,7 @@ check_set(uint8_t *in, size_t in_size, uint8_t *expected,
buf2_pos
=
0
;
erval
=
der_encode
(
&
asn_DEF_DefaultSet
,
tp
,
buf2_fill
,
0
);
compare_encoding
(
&
erval
,
expected
,
expected_size
,
buf2
);
ASN_STRUCT_RESET
(
asn_DEF_DefaultSet
,
tp
);
}
int
...
...
tests/tests-c-compiler/check-src/check-22.-fwide-types.c
View file @
cef21e07
...
...
@@ -79,6 +79,7 @@ check(int is_ok, uint8_t *buf, size_t size, size_t consumed) {
);
}
assert
(
rval
.
consumed
<=
(
size_t
)
consumed
);
ASN_STRUCT_RESET
(
asn_DEF_T1
,
tp
);
return
;
}
...
...
@@ -113,6 +114,8 @@ check(int is_ok, uint8_t *buf, size_t size, size_t consumed) {
ret
=
xer_fprint
(
stderr
,
&
asn_DEF_T1
,
tp
);
assert
(
ret
==
0
);
fprintf
(
stderr
,
"=== EOF ===
\n
"
);
ASN_STRUCT_RESET
(
asn_DEF_T1
,
tp
);
}
static
void
...
...
tests/tests-c-compiler/check-src/check-24.-fwide-types.c
View file @
cef21e07
...
...
@@ -58,6 +58,8 @@ check(int is_ok, uint8_t *buf, size_t size, size_t consumed) {
}
assert
(
rval
.
consumed
<=
consumed
);
}
ASN_STRUCT_RESET
(
asn_DEF_T
,
tp
);
}
static
void
...
...
tests/tests-c-compiler/check-src/check-30.-fwide-types.c
View file @
cef21e07
...
...
@@ -177,6 +177,7 @@ check(int is_ok, uint8_t *buf, size_t size, size_t consumed) {
}
assert
(
rval
.
consumed
<=
consumed
);
}
ASN_STRUCT_RESET
(
asn_DEF_T
,
tp
);
}
...
...
@@ -212,6 +213,8 @@ check_xer(uint8_t *buf, uint8_t size, char *xer_sample) {
printf
(
"[%s] vs [%s]
\n
"
,
xer_buf
,
xer_sample
);
assert
(
xer_off
==
xer_sample_len
);
assert
(
memcmp
(
xer_buf
,
xer_sample
,
xer_off
)
==
0
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
tp
);
}
static
void
...
...
tests/tests-c-compiler/check-src/check-31.-fwide-types.c
View file @
cef21e07
...
...
@@ -124,6 +124,7 @@ check(int is_ok, uint8_t *buf, size_t size, size_t consumed) {
);
}
assert
(
rval
.
consumed
<=
consumed
);
ASN_STRUCT_RESET
(
asn_DEF_Forest
,
&
t
);
return
;
}
...
...
@@ -173,6 +174,8 @@ check_xer(uint8_t *buf, uint8_t size, char *xer_sample) {
printf
(
"[%s] vs [%s]
\n
"
,
xer_buf
,
xer_sample
);
assert
(
xer_off
==
xer_sample_len
);
assert
(
memcmp
(
xer_buf
,
xer_sample
,
xer_off
)
==
0
);
ASN_STRUCT_FREE
(
asn_DEF_Forest
,
tp
);
}
...
...
tests/tests-c-compiler/check-src/check-32.c
View file @
cef21e07
...
...
@@ -57,6 +57,7 @@ main(int ac, char **av) {
assert
(
swo
->
seqOfOpt
!=
0
);
xer_fprint
(
stderr
,
&
asn_DEF_SeqWithOptional
,
swo
);
void
*
tmp
=
swo
->
seqOfOpt
;
swo
->
seqOfOpt
=
0
;
erv
=
der_encode_to_buffer
(
&
asn_DEF_SeqWithOptional
,
...
...
@@ -64,10 +65,15 @@ main(int ac, char **av) {
assert
(
erv
.
encoded
>
0
);
buf
[
erv
.
encoded
]
=
'\0'
;
swo
->
seqOfOpt
=
tmp
;
ASN_STRUCT_RESET
(
asn_DEF_SeqWithMandatory
,
&
swm
);
ASN_STRUCT_FREE
(
asn_DEF_SeqWithOptional
,
swo
);
swo
=
0
;
drv
=
ber_decode
(
0
,
&
asn_DEF_SeqWithMandatory
,
(
void
**
)
&
swo
,
buf
,
erv
.
encoded
);
assert
(
drv
.
code
!=
RC_OK
);
ASN_STRUCT_FREE
(
asn_DEF_SeqWithOptional
,
swo
);
swo
=
0
;
drv
=
ber_decode
(
0
,
&
asn_DEF_SeqWithOptional
,
(
void
**
)
&
swo
,
buf
,
erv
.
encoded
);
...
...
@@ -76,6 +82,7 @@ main(int ac, char **av) {
assert
(
swo
->
seqOfOpt
==
0
);
xer_fprint
(
stderr
,
&
asn_DEF_SeqWithOptional
,
swo
);
ASN_STRUCT_FREE
(
asn_DEF_SeqWithOptional
,
swo
);
printf
(
"Finished
\n
"
);
...
...
tests/tests-c-compiler/check-src/check-35.c
View file @
cef21e07
...
...
@@ -304,6 +304,8 @@ check_xer(uint8_t *data, uint8_t size, char *xer_sample) {
assert
(
er
.
encoded
==
(
ssize_t
)
xer_off
);
assert
(
xer_off
==
xer_sample_len
);
assert
(
memcmp
(
xer_buf
,
xer_sample
,
xer_off
)
==
0
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
tp
);
}
...
...
tests/tests-c-compiler/check-src/check-46.c
View file @
cef21e07
...
...
@@ -31,6 +31,7 @@ check(uint8_t *buf, size_t size, size_t consumed) {
assert
(
rval
.
code
==
RC_OK
);
assert
(
rval
.
consumed
==
consumed
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
tp
);
}
int
...
...
tests/tests-c-compiler/check-src/check-48.c
View file @
cef21e07
...
...
@@ -94,5 +94,7 @@ main() {
printf
(
"OK
\n
"
);
ASN_STRUCT_RESET
(
asn_DEF_UserIdentifier
,
&
user
);
ASN_STRUCT_RESET
(
asn_DEF_UserIdentifier
,
&
user_new
);
return
ret
;
}
tests/tests-c-compiler/check-src/check-60.c
View file @
cef21e07
...
...
@@ -109,7 +109,7 @@ main() {
* Test the T1 with primitive encoding.
*/
memset
(
&
t1
,
0
,
sizeof
(
t1
));
memset
(
&
t1_new
,
0
,
sizeof
(
t1_new
)
);
ASN_STRUCT_RESET
(
asn_DEF_T1
,
&
t1_new
);
t1
.
i
=
-
112233
;
t1
.
any
.
buf
=
test_any_buf2
;
...
...
@@ -123,6 +123,7 @@ main() {
assert
(
t1_new
.
i
==
-
112233
);
assert
(
t1_new
.
any
.
size
==
(
ssize_t
)
sizeof
(
test_any_buf2
));
assert
(
memcmp
(
t1_new
.
any
.
buf
,
test_any_buf2
,
sizeof
(
test_any_buf2
))
==
0
);
ASN_STRUCT_RESET
(
asn_DEF_T1
,
&
t1_new
);
/*
* Test the T2 empty sequence.
...
...
@@ -146,8 +147,8 @@ main() {
/*
* Test the T2 sequence.
*/
memset
(
&
t2
,
0
,
sizeof
(
t2
)
);
memset
(
&
t2_new
,
0
,
sizeof
(
t2_new
)
);
ASN_STRUCT_RESET
(
asn_DEF_T2
,
&
t2
);
ASN_STRUCT_RESET
(
asn_DEF_T2
,
&
t2_new
);
t2
.
i
=
332211
;
t2
.
any
=
calloc
(
1
,
sizeof
(
*
t2
.
any
));
...
...
@@ -166,8 +167,10 @@ main() {
/*
* Test the T2 sequence with primitive encoding.
*/
memset
(
&
t2
,
0
,
sizeof
(
t2
));
memset
(
&
t2_new
,
0
,
sizeof
(
t2_new
));
t2
.
any
->
buf
=
NULL
;
t2
.
any
->
size
=
0
;
ASN_STRUCT_RESET
(
asn_DEF_T2
,
&
t2
);
ASN_STRUCT_RESET
(
asn_DEF_T2
,
&
t2_new
);
t2
.
i
=
0
;
t2
.
any
=
calloc
(
1
,
sizeof
(
*
t2
.
any
));
...
...
@@ -188,7 +191,7 @@ main() {
*/
free
(
t2
.
any
);
t2
.
any
=
0
;
memset
(
&
t2_new
,
0
,
sizeof
(
t2_new
)
);
ASN_STRUCT_RESET
(
asn_DEF_T2
,
&
t2_new
);
save_object
(
&
t2
,
td2
);
ret
=
load_object
(
&
t2_new
,
td2
);
...
...
tests/tests-c-compiler/check-src/check-65.c
View file @
cef21e07
...
...
@@ -95,6 +95,7 @@ check_2(int is_ok, uint8_t *buf, size_t size, size_t consumed) {
}
assert
(
rval
.
consumed
<=
consumed
);
}
ASN_STRUCT_RESET
(
*
td
,
tp
);
}
int
...
...
tests/tests-c-compiler/check-src/check-70.-fwide-types.c
View file @
cef21e07
...
...
@@ -190,6 +190,7 @@ process_XER_data(enum expectation expectation, unsigned char *fbuf, size_t size)
/* Save and re-load as DER */
save_object_as
(
st
,
ATS_DER
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
st
=
load_object_from
(
expectation
,
buf
,
buf_offset
,
ATS_BER
);
assert
(
st
);
...
...
tests/tests-c-compiler/check-src/check-70.c
View file @
cef21e07
...
...
@@ -184,6 +184,7 @@ process_XER_data(enum expectation expectation, unsigned char *fbuf, size_t size)
/* Save and re-load as DER */
save_object_as
(
st
,
ATS_DER
);
ASN_STRUCT_FREE
(
asn_DEF_PDU
,
st
);
st
=
load_object_from
(
expectation
,
buf
,
buf_offset
,
ATS_BER
);
assert
(
st
);
...
...
tests/tests-c-compiler/check-src/check64-134.-gen-PER.c
View file @
cef21e07
...
...
@@ -70,6 +70,7 @@ verify(int testNo, T_t *ti) {
xer_fprint
(
stderr
,
&
asn_DEF_T
,
ti
);
xer_fprint
(
stderr
,
&
asn_DEF_T
,
to
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
to
);
}
static
void
...
...
@@ -95,36 +96,42 @@ int main() {
l2i
(
&
ti
.
signed33
,
0
);
l2i
(
&
ti
.
signed33ext
,
0
);
verify
(
1
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
1
);
ul2i
(
&
ti
.
unsigned42
,
1
);
l2i
(
&
ti
.
signed33
,
1
);
l2i
(
&
ti
.
signed33ext
,
1
);
verify
(
2
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
5000000000
);
ul2i
(
&
ti
.
unsigned42
,
3153600000000
);
l2i
(
&
ti
.
signed33
,
4000000000
);
l2i
(
&
ti
.
signed33ext
,
4000000000
);
verify
(
3
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
-
1
);
ul2i
(
&
ti
.
unsigned42
,
0
);
l2i
(
&
ti
.
signed33
,
0
);
l2i
(
&
ti
.
signed33ext
,
0
);
NO_encode
(
4
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
0
);
ul2i
(
&
ti
.
unsigned42
,
-
1
);
l2i
(
&
ti
.
signed33
,
0
);
l2i
(
&
ti
.
signed33ext
,
0
);
NO_encode
(
5
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
0
);
ul2i
(
&
ti
.
unsigned42
,
0
);
l2i
(
&
ti
.
signed33
,
-
4000000000
-
1
);
l2i
(
&
ti
.
signed33ext
,
0
);
NO_encode
(
6
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
0
);
ul2i
(
&
ti
.
unsigned42
,
0
);
...
...
@@ -132,30 +139,35 @@ int main() {
l2i
(
&
ti
.
signed33ext
,
-
4000000000
-
1
);
assert
(
ti
.
signed33ext
.
size
==
5
);
verify
(
7
,
&
ti
);
/* signed33ext is extensible */
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
5000000000
+
1
);
ul2i
(
&
ti
.
unsigned42
,
0
);
l2i
(
&
ti
.
signed33
,
0
);
l2i
(
&
ti
.
signed33ext
,
0
);
NO_encode
(
8
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
0
);
ul2i
(
&
ti
.
unsigned42
,
3153600000000
+
1
);
l2i
(
&
ti
.
signed33
,
0
);
l2i
(
&
ti
.
signed33ext
,
0
);
NO_encode
(
9
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
5000000000
-
1
);
ul2i
(
&
ti
.
unsigned42
,
3153600000000
-
1
);
l2i
(
&
ti
.
signed33
,
4000000000
-
1
);
l2i
(
&
ti
.
signed33ext
,
4000000000
-
1
);
verify
(
10
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
ul2i
(
&
ti
.
unsigned33
,
0
);
ul2i
(
&
ti
.
unsigned42
,
0
);
l2i
(
&
ti
.
signed33
,
0
);
l2i
(
&
ti
.
signed33ext
,
4000000000
+
1
);
verify
(
11
,
&
ti
);
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
ti
);
return
0
;
}
...
...
tests/tests-c-compiler/check-src/check64-136.-gen-OER.c
View file @
cef21e07
...
...
@@ -38,7 +38,8 @@ int main() {
if
(
XEQ_SUCCESS
!=
xer_equivalent
(
&
asn_DEF_T
,
&
source
,
decoded
,
stderr
))
{
return
1
;
}
ASN_STRUCT_RESET
(
asn_DEF_T
,
&
source
);
ASN_STRUCT_FREE
(
asn_DEF_T
,
decoded
);
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