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
81732413
Commit
81732413
authored
Jan 27, 2022
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clar: format sha256 in cl_assert_equal_oid
parent
0db1c57c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
tests/clar/clar_libgit2.h
+19
-2
No files found.
tests/clar/clar_libgit2.h
View file @
81732413
...
...
@@ -136,13 +136,30 @@ GIT_INLINE(void) clar__assert_equal_oid(
const
char
*
file
,
const
char
*
func
,
int
line
,
const
char
*
desc
,
const
git_oid
*
one
,
const
git_oid
*
two
)
{
if
(
git_oid_cmp
(
one
,
two
))
{
char
err
[]
=
"
\"
........................................
\"
!=
\"
........................................
\"
"
;
if
(
git_oid_equal
(
one
,
two
))
return
;
if
(
one
->
type
!=
two
->
type
)
{
char
err
[
64
];
snprintf
(
err
,
64
,
"different oid types: %d vs %d"
,
one
->
type
,
two
->
type
);
clar__fail
(
file
,
func
,
line
,
desc
,
err
,
1
);
}
else
if
(
one
->
type
==
GIT_OID_SHA1
)
{
char
err
[]
=
"
\"
........................................
\"
!=
\"
........................................
\"
"
;
git_oid_fmt
(
&
err
[
1
],
one
);
git_oid_fmt
(
&
err
[
47
],
two
);
clar__fail
(
file
,
func
,
line
,
desc
,
err
,
1
);
}
else
if
(
one
->
type
==
GIT_OID_SHA256
)
{
char
err
[]
=
"
\"
................................................................
\"
!=
\"
................................................................
\"
"
;
git_oid_fmt
(
&
err
[
1
],
one
);
git_oid_fmt
(
&
err
[
71
],
one
);
clar__fail
(
file
,
func
,
line
,
desc
,
err
,
1
);
}
else
{
clar__fail
(
file
,
func
,
line
,
desc
,
"unknown oid types"
,
1
);
}
}
...
...
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