Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
994df32e
Commit
994df32e
authored
Oct 09, 2012
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: More unit testing for DATA_Find()
parent
ece49801
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
test_data.c
src/test/test_data.c
+22
-0
No files found.
src/test/test_data.c
View file @
994df32e
...
...
@@ -126,6 +126,28 @@ static const char
sprintf
(
errmsg
,
"DATA_Find: %d, returned NULL"
,
1234567890
+
i
);
mu_assert
(
errmsg
,
entry2
!=
NULL
);
}
entry2
=
DATA_Find
(
1234567890
+
tbl
.
len
);
mu_assert
(
"DATA_Find: expected NULL"
,
entry2
==
NULL
);
for
(
int
i
=
0
;
i
<
tbl
.
len
/
2
;
i
++
)
{
entry1
=
DATA_Find
(
1234567890
+
i
);
entry1
->
state
=
DATA_EMPTY
;
entry1
->
xid
=
0
;
}
for
(
int
i
=
0
;
i
<
tbl
.
len
;
i
++
)
{
entry2
=
DATA_Find
(
1234567890
+
i
);
if
(
i
<
tbl
.
len
/
2
)
mu_assert
(
"DATA_Find: expected NULL"
,
entry2
==
NULL
);
else
{
sprintf
(
errmsg
,
"DATA_Find: %d, returned NULL"
,
1234567890
+
i
);
mu_assert
(
errmsg
,
entry2
!=
NULL
);
sprintf
(
errmsg
,
"DATA_Find: %d, got %d"
,
1234567890
+
i
,
entry2
->
xid
);
mu_assert
(
errmsg
,
entry2
->
xid
==
1234567890
+
i
);
}
}
return
NULL
;
}
...
...
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