Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c40d2dc5
Commit
c40d2dc5
authored
May 15, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
thread: restore the git_thread_exit tests
We were never properly testing git_thread_exit. Do so.
parent
4853d94c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
tests/threads/basic.c
+7
-1
No files found.
tests/threads/basic.c
View file @
c40d2dc5
...
...
@@ -54,6 +54,12 @@ static void *return_normally(void *param)
{
return
param
;
}
static
void
*
exit_abruptly
(
void
*
param
)
{
git_thread_exit
(
param
);
return
NULL
;
}
#endif
void
test_threads_basic__exit
(
void
)
...
...
@@ -70,7 +76,7 @@ void test_threads_basic__exit(void)
cl_assert_equal_sz
(
424242
,
(
size_t
)
result
);
/* Ensure that the return value of `git_thread_exit` is returned. */
cl_git_pass
(
git_thread_create
(
&
thread
,
return_normal
ly
,
(
void
*
)
232323
));
cl_git_pass
(
git_thread_create
(
&
thread
,
exit_abrupt
ly
,
(
void
*
)
232323
));
cl_git_pass
(
git_thread_join
(
&
thread
,
&
result
));
cl_assert_equal_sz
(
232323
,
(
size_t
)
result
);
#endif
...
...
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