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
7eac0df3
Commit
7eac0df3
authored
Jul 25, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
employ XER equivalence check
parent
2d747bdd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
25 deletions
+22
-25
asn1c/tests/check-src/check-135.-gen-OER.c
asn1c/tests/check-src/check-135.-gen-OER.c
+8
-9
asn1c/tests/check-src/check-137.-gen-OER.c
asn1c/tests/check-src/check-137.-gen-OER.c
+5
-6
asn1c/tests/check-src/check64-136.-gen-OER.c
asn1c/tests/check-src/check64-136.-gen-OER.c
+9
-10
No files found.
asn1c/tests/check-src/check-135.-gen-OER.c
View file @
7eac0df3
...
@@ -14,17 +14,17 @@
...
@@ -14,17 +14,17 @@
int
main
()
{
int
main
()
{
uint8_t
tmpbuf
[
128
];
uint8_t
tmpbuf
[
128
];
T_t
empty_t
;
T_t
source
;
T_t
*
decoded_t
=
0
;
/* "= 0" is important */
T_t
*
decoded
=
0
;
/* "= 0" is important */
memset
(
&
empty_t
,
0
,
sizeof
(
empty_t
));
memset
(
&
source
,
0
,
sizeof
(
source
));
asn_enc_rval_t
er
=
asn_enc_rval_t
er
=
oer_encode_to_buffer
(
&
asn_DEF_T
,
0
,
&
empty_t
,
tmpbuf
,
sizeof
(
tmpbuf
));
oer_encode_to_buffer
(
&
asn_DEF_T
,
0
,
&
source
,
tmpbuf
,
sizeof
(
tmpbuf
));
assert
(
er
.
encoded
!=
-
1
);
assert
(
er
.
encoded
!=
-
1
);
asn_dec_rval_t
dr
=
asn_dec_rval_t
dr
=
oer_decode
(
0
,
&
asn_DEF_T
,
(
void
**
)
&
decoded
_t
,
tmpbuf
,
er
.
encoded
);
oer_decode
(
0
,
&
asn_DEF_T
,
(
void
**
)
&
decoded
,
tmpbuf
,
er
.
encoded
);
assert
(
dr
.
code
==
RC_OK
);
assert
(
dr
.
code
==
RC_OK
);
if
(
dr
.
consumed
!=
er
.
encoded
)
{
if
(
dr
.
consumed
!=
er
.
encoded
)
{
...
@@ -32,10 +32,9 @@ int main() {
...
@@ -32,10 +32,9 @@ int main() {
assert
(
dr
.
consumed
==
er
.
encoded
);
assert
(
dr
.
consumed
==
er
.
encoded
);
}
}
fprintf
(
stderr
,
"Original:
\n
"
);
if
(
XEQ_SUCCESS
!=
xer_equivalent
(
&
asn_DEF_T
,
&
source
,
decoded
,
stderr
))
{
xer_fprint
(
stderr
,
&
asn_DEF_T
,
&
empty_t
);
return
1
;
fprintf
(
stderr
,
"Decoded:
\n
"
);
}
xer_fprint
(
stderr
,
&
asn_DEF_T
,
decoded_t
);
return
0
;
return
0
;
}
}
...
...
asn1c/tests/check-src/check-137.-gen-OER.c
View file @
7eac0df3
...
@@ -42,10 +42,9 @@ int main() {
...
@@ -42,10 +42,9 @@ int main() {
assert
(
dr
.
consumed
==
er
.
encoded
);
assert
(
dr
.
consumed
==
er
.
encoded
);
}
}
fprintf
(
stderr
,
"Original:
\n
"
);
if
(
XEQ_SUCCESS
!=
xer_equivalent
(
&
asn_DEF_T
,
&
source
,
decoded
,
stderr
))
{
xer_fprint
(
stderr
,
&
asn_DEF_T
,
&
source
);
return
1
;
fprintf
(
stderr
,
"Decoded:
\n
"
);
}
xer_fprint
(
stderr
,
&
asn_DEF_T
,
decoded
);
return
0
;
return
0
;
}
}
...
...
asn1c/tests/check-src/check64-136.-gen-OER.c
View file @
7eac0df3
...
@@ -14,20 +14,20 @@
...
@@ -14,20 +14,20 @@
int
main
()
{
int
main
()
{
uint8_t
tmpbuf
[
128
];
uint8_t
tmpbuf
[
128
];
T_t
empty_t
;
T_t
source
;
T_t
*
decoded_t
=
0
;
/* "= 0" is important */
T_t
*
decoded
=
0
;
/* "= 0" is important */
memset
(
&
empty_t
,
0
,
sizeof
(
empty_t
));
memset
(
&
source
,
0
,
sizeof
(
source
));
/* Fill in complex INTEGER */
/* Fill in complex INTEGER */
asn_long2INTEGER
(
&
empty_t
.
unsigned33
,
0
);
asn_long2INTEGER
(
&
source
.
unsigned33
,
0
);
asn_enc_rval_t
er
=
asn_enc_rval_t
er
=
oer_encode_to_buffer
(
&
asn_DEF_T
,
0
,
&
empty_t
,
tmpbuf
,
sizeof
(
tmpbuf
));
oer_encode_to_buffer
(
&
asn_DEF_T
,
0
,
&
source
,
tmpbuf
,
sizeof
(
tmpbuf
));
assert
(
er
.
encoded
!=
-
1
);
assert
(
er
.
encoded
!=
-
1
);
asn_dec_rval_t
dr
=
asn_dec_rval_t
dr
=
oer_decode
(
0
,
&
asn_DEF_T
,
(
void
**
)
&
decoded
_t
,
tmpbuf
,
er
.
encoded
);
oer_decode
(
0
,
&
asn_DEF_T
,
(
void
**
)
&
decoded
,
tmpbuf
,
er
.
encoded
);
assert
(
dr
.
code
==
RC_OK
);
assert
(
dr
.
code
==
RC_OK
);
if
(
dr
.
consumed
!=
er
.
encoded
)
{
if
(
dr
.
consumed
!=
er
.
encoded
)
{
...
@@ -35,10 +35,9 @@ int main() {
...
@@ -35,10 +35,9 @@ int main() {
assert
(
dr
.
consumed
==
er
.
encoded
);
assert
(
dr
.
consumed
==
er
.
encoded
);
}
}
fprintf
(
stderr
,
"Original:
\n
"
);
if
(
XEQ_SUCCESS
!=
xer_equivalent
(
&
asn_DEF_T
,
&
source
,
decoded
,
stderr
))
{
xer_fprint
(
stderr
,
&
asn_DEF_T
,
&
empty_t
);
return
1
;
fprintf
(
stderr
,
"Decoded:
\n
"
);
}
xer_fprint
(
stderr
,
&
asn_DEF_T
,
decoded_t
);
return
0
;
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