Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
2903889b
Commit
2903889b
authored
Sep 28, 2002
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* testsuite/sexp-test.c (test_main): Reordered sexp_iterator_assoc
tests. Rev: src/nettle/testsuite/sexp-test.c:1.2
parent
848b37be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
testsuite/sexp-test.c
testsuite/sexp-test.c
+14
-6
No files found.
testsuite/sexp-test.c
View file @
2903889b
...
...
@@ -39,13 +39,9 @@ test_main(void)
{
{
LDATA
(
"n"
)
},
{
LDATA
(
"e"
)
}
};
struct
sexp_iterator
v
[
2
];
sexp_iterator_init
(
&
i
,
LDATA
(
"((1:n))"
));
ASSERT
(
!
sexp_iterator_assoc
(
&
i
,
2
,
keys
,
v
));
sexp_iterator_init
(
&
i
,
LDATA
(
"((1:n)(1:n3:foo))"
));
ASSERT
(
!
sexp_iterator_assoc
(
&
i
,
2
,
keys
,
v
));
sexp_iterator_init
(
&
i
,
LDATA
(
"((1:n2:xx3:foo)0:(1:y)(1:e))"
));
ASSERT
(
sexp_iterator_assoc
(
&
i
,
2
,
keys
,
v
));
ASSERT
(
sexp_iterator_next
(
&
i
)
&&
sexp_iterator_assoc
(
&
i
,
2
,
keys
,
v
));
ASSERT
(
sexp_iterator_next
(
&
v
[
0
])
&&
v
[
0
].
type
==
SEXP_ATOM
&&
!
v
[
0
].
display_length
&&
!
v
[
0
].
display
...
...
@@ -56,6 +52,18 @@ test_main(void)
&&
v
[
0
].
atom_length
==
3
&&
MEMEQ
(
3
,
"foo"
,
v
[
0
].
atom
)
&&
sexp_iterator_next
(
&
v
[
0
])
&&
v
[
0
].
type
==
SEXP_END
);
ASSERT
(
sexp_iterator_next
(
&
v
[
1
])
&&
v
[
1
].
type
==
SEXP_END
);
#if 0
sexp_iterator_init(&i, LDATA("((1:n))"));
ASSERT(sexp_iterator_next(&i)
&& !sexp_iterator_assoc(&i, 2, keys, v));
sexp_iterator_init(&i, LDATA("((1:n)(1:n3:foo))"));
ASSERT(sexp_iterator_next(&i)
&& !sexp_iterator_assoc(&i, 2, keys, v));
#endif
}
SUCCESS
();
}
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