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
25e8b201
Commit
25e8b201
authored
Oct 18, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken tests
parent
909f6265
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
tests-clar/checkout/index.c
+5
-5
tests-clar/checkout/tree.c
+5
-5
No files found.
tests-clar/checkout/index.c
View file @
25e8b201
...
...
@@ -364,16 +364,16 @@ void test_checkout_index__wont_notify_of_expected_line_ending_changes(void)
static
void
progress
(
const
char
*
path
,
float
progress
,
void
*
payload
)
{
GIT_UNUSED
(
path
);
GIT_UNUSED
(
progress
);
int
*
count
=
(
int
*
)
payload
;
(
*
count
)
++
;
bool
*
was_called
=
(
bool
*
)
payload
;
*
was_called
=
true
;
}
void
test_checkout_index__calls_progress_callback
(
void
)
{
int
count
=
0
;
bool
was_called
=
0
;
g_opts
.
progress_cb
=
progress
;
g_opts
.
progress_payload
=
&
count
;
g_opts
.
progress_payload
=
&
was_called
;
cl_git_pass
(
git_checkout_index
(
g_repo
,
&
g_opts
));
cl_assert_equal_i
(
count
,
5
);
cl_assert_equal_i
(
was_called
,
true
);
}
tests-clar/checkout/tree.c
View file @
25e8b201
...
...
@@ -67,17 +67,17 @@ void test_checkout_tree__can_checkout_a_subdirectory_from_a_subtree(void)
static
void
progress
(
const
char
*
path
,
float
progress
,
void
*
payload
)
{
GIT_UNUSED
(
path
);
GIT_UNUSED
(
progress
);
int
*
count
=
(
int
*
)
payload
;
(
*
count
)
++
;
bool
*
was_called
=
(
bool
*
)
payload
;
*
was_called
=
true
;
}
void
test_checkout_tree__calls_progress_callback
(
void
)
{
int
count
=
0
;
bool
was_called
=
0
;
g_opts
.
progress_cb
=
progress
;
g_opts
.
progress_payload
=
&
count
;
g_opts
.
progress_payload
=
&
was_called
;
cl_git_pass
(
git_revparse_single
(
&
g_object
,
g_repo
,
"master"
));
cl_git_pass
(
git_checkout_tree
(
g_repo
,
g_object
,
&
g_opts
));
cl_assert_equal_i
(
count
,
4
);
cl_assert_equal_i
(
was_called
,
true
);
}
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