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
1cb15718
Commit
1cb15718
authored
Jul 16, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: reorganize reflog tests
parent
944d250f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
tests-clar/refs/reflog/reflog.c
+8
-7
No files found.
tests-clar/refs/reflog.c
→
tests-clar/refs/reflog
/reflog
.c
View file @
1cb15718
...
...
@@ -24,22 +24,22 @@ static void assert_signature(git_signature *expected, git_signature *actual)
// Fixture setup and teardown
void
test_refs_reflog__initialize
(
void
)
void
test_refs_reflog_
reflog_
_initialize
(
void
)
{
g_repo
=
cl_git_sandbox_init
(
"testrepo.git"
);
}
void
test_refs_reflog__cleanup
(
void
)
void
test_refs_reflog_
reflog_
_cleanup
(
void
)
{
cl_git_sandbox_cleanup
();
}
void
test_refs_reflog__write_then_read
(
void
)
void
test_refs_reflog_
reflog_
_write_then_read
(
void
)
{
// write a reflog for a given reference and ensure it can be read back
git_repository
*
repo2
;
git_repository
*
repo2
;
git_reference
*
ref
,
*
lookedup_ref
;
git_oid
oid
;
git_signature
*
committer
;
...
...
@@ -94,7 +94,7 @@ void test_refs_reflog__write_then_read(void)
git_reference_free
(
lookedup_ref
);
}
void
test_refs_reflog__dont_write_bad
(
void
)
void
test_refs_reflog_
reflog_
_dont_write_bad
(
void
)
{
// avoid writing an obviously wrong reflog
git_reference
*
ref
;
...
...
@@ -122,7 +122,7 @@ void test_refs_reflog__dont_write_bad(void)
git_reference_free
(
ref
);
}
void
test_refs_reflog__renaming_the_reference_moves_the_reflog
(
void
)
void
test_refs_reflog_
reflog_
_renaming_the_reference_moves_the_reflog
(
void
)
{
git_reference
*
master
;
git_buf
master_log_path
=
GIT_BUF_INIT
,
moved_log_path
=
GIT_BUF_INIT
;
...
...
@@ -145,6 +145,7 @@ void test_refs_reflog__renaming_the_reference_moves_the_reflog(void)
git_buf_free
(
&
moved_log_path
);
git_buf_free
(
&
master_log_path
);
}
static
void
assert_has_reflog
(
bool
expected_result
,
const
char
*
name
)
{
git_reference
*
ref
;
...
...
@@ -156,7 +157,7 @@ static void assert_has_reflog(bool expected_result, const char *name)
git_reference_free
(
ref
);
}
void
test_refs_reflog__reference_has_reflog
(
void
)
void
test_refs_reflog_
reflog_
_reference_has_reflog
(
void
)
{
assert_has_reflog
(
true
,
"HEAD"
);
assert_has_reflog
(
true
,
"refs/heads/master"
);
...
...
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