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
2932c882
Commit
2932c882
authored
Mar 04, 2013
by
Greg Price
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revwalk: refactor tests a bit
Signed-off-by: Greg Price <price@mit.edu>
parent
06e6eab0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
tests-clar/revwalk/basic.c
+11
-7
No files found.
tests-clar/revwalk/basic.c
View file @
2932c882
...
...
@@ -56,22 +56,17 @@ static int get_commit_index(git_oid *raw_oid)
return
-
1
;
}
static
int
test_walk
(
git_revwalk
*
walk
,
const
git_oid
*
root
,
int
flags
,
const
int
possible_results
[][
6
],
int
results_count
)
static
int
test_walk
_only
(
git_revwalk
*
walk
,
const
int
possible_results
[][
commit_count
],
int
results_count
)
{
git_oid
oid
;
int
i
;
int
result_array
[
commit_count
];
git_revwalk_sorting
(
walk
,
flags
);
git_revwalk_push
(
walk
,
root
);
for
(
i
=
0
;
i
<
commit_count
;
++
i
)
result_array
[
i
]
=
-
1
;
i
=
0
;
while
(
git_revwalk_next
(
&
oid
,
walk
)
==
0
)
{
result_array
[
i
++
]
=
get_commit_index
(
&
oid
);
/*{
...
...
@@ -90,6 +85,15 @@ static int test_walk(git_revwalk *walk, const git_oid *root,
return
GIT_ERROR
;
}
static
int
test_walk
(
git_revwalk
*
walk
,
const
git_oid
*
root
,
int
flags
,
const
int
possible_results
[][
6
],
int
results_count
)
{
git_revwalk_sorting
(
walk
,
flags
);
git_revwalk_push
(
walk
,
root
);
return
test_walk_only
(
walk
,
possible_results
,
results_count
);
}
static
git_repository
*
_repo
;
static
git_revwalk
*
_walk
;
...
...
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