Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qwebaby3
asn1c
Commits
6ab88965
Commit
6ab88965
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
api change
parent
c8092cb2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
skeletons/tests/check-XER.c
+7
-9
7 additions, 9 deletions
skeletons/tests/check-XER.c
with
7 additions
and
9 deletions
skeletons/tests/check-XER.c
+
7
−
9
View file @
6ab88965
...
...
@@ -14,14 +14,13 @@ check(char *tag, char *name, xer_check_tag_e value) {
static
void
check_next
(
char
*
xerbuf
,
int
expected_chunk_size
,
pxer_chunk_type_e
expected_chunk_type
)
{
int
stateContext
=
0
;
int
xerbuf_len
=
strlen
(
xerbuf
);
pxer_chunk_type_e
ch_type
;
ssize_t
ch_size
;
if
(
expected_chunk_size
==
-
1
)
expected_chunk_size
=
xerbuf_len
;
ch_size
=
xer_next_token
(
&
stateContext
,
xerbuf
,
xerbuf_len
,
&
ch_type
);
ch_size
=
xer_next_token
(
xerbuf
,
xerbuf_len
,
&
ch_type
);
printf
(
"[%s]:%d
\n
"
,
xerbuf
,
xerbuf_len
);
printf
(
"chunk sizes: %d vs %d, chunk types: %d vs %d
\n
"
,
...
...
@@ -50,8 +49,8 @@ main() {
check
(
"</>"
,
""
,
XCT_CLOSING
);
check
(
""
,
"a"
,
XCT_BROKEN
);
check
(
"<>"
,
"a"
,
XCT_UN
EXPECTED
);
check
(
"</>"
,
"a"
,
XCT_UN
EXPECTED
);
check
(
"<>"
,
"a"
,
XCT_UN
KNOWN_OP
);
check
(
"</>"
,
"a"
,
XCT_UN
KNOWN_CL
);
check
(
"a"
,
"a"
,
XCT_BROKEN
);
check
(
"<a>"
,
"a"
,
XCT_OPENING
);
...
...
@@ -64,18 +63,17 @@ main() {
check
(
"</a/>"
,
"a"
,
XCT_BROKEN
);
check
(
"<a/>"
,
"a"
,
XCT_BOTH
);
check
(
"<tag>"
,
"a"
,
XCT_UN
EXPECTED
);
check
(
"<tag>"
,
"a"
,
XCT_UN
KNOWN_OP
);
check
(
"<tag>"
,
"tag"
,
XCT_OPENING
);
check
(
"</tag>"
,
"tag"
,
XCT_CLOSING
);
check
(
"</tag/>"
,
"tag"
,
XCT_BROKEN
);
check
(
"<tag/>"
,
"tag"
,
XCT_BOTH
);
check
(
"<tag>"
,
"ta"
,
XCT_UNEXPECTED
);
check
(
"<tag>"
,
"ta"
,
XCT_UNEXPECTED
);
check
(
"</tag>"
,
"ta"
,
XCT_UNEXPECTED
);
check
(
"<tag>"
,
"ta"
,
XCT_UNKNOWN_OP
);
check
(
"</tag>"
,
"ta"
,
XCT_UNKNOWN_CL
);
check
(
"</tag/>"
,
"ta"
,
XCT_BROKEN
);
check
(
"<tag/>"
,
"ta"
,
XCT_UN
EXPECTED
);
check
(
"<tag/>"
,
"ta"
,
XCT_UN
KNOWN_BO
);
check
(
"<tag attribute=
\"
value
\"
/>"
,
"tag"
,
XCT_BOTH
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment