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
25803c63
Commit
25803c63
authored
Sep 12, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1848 from libgit2/ntk/fix/cl_assert_equal_sz
Fix cl_assert_equal_sz error message formating
parents
a6ee1661
6f200361
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
tests-clar/clar.c
+1
-1
tests-clar/clar.h
+1
-0
tests-clar/clar_libgit2.h
+0
-2
No files found.
tests-clar/clar.c
View file @
25803c63
...
...
@@ -468,7 +468,7 @@ void clar__assert_equal(
}
}
}
else
if
(
!
strcmp
(
PRIuZ
,
fmt
)
||
!
strcmp
(
PRIxZ
,
fmt
))
{
else
if
(
!
strcmp
(
"%"
PRIuZ
,
fmt
)
||
!
strcmp
(
"%"
PRIxZ
,
fmt
))
{
size_t
sz1
=
va_arg
(
args
,
size_t
),
sz2
=
va_arg
(
args
,
size_t
);
is_equal
=
(
sz1
==
sz2
);
if
(
!
is_equal
)
{
...
...
tests-clar/clar.h
View file @
25803c63
...
...
@@ -68,6 +68,7 @@ void cl_fixture_cleanup(const char *fixture_name);
#define cl_assert_equal_p(p1,p2) clar__assert_equal(__FILE__,__LINE__,"Pointer mismatch: " #p1 " != " #p2, 1, "%p", (p1), (p2))
#define cl_assert_equal_sz(sz1,sz2) clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, "%"PRIuZ, (size_t)(sz1), (size_t)(sz2))
void
clar__fail
(
const
char
*
file
,
...
...
tests-clar/clar_libgit2.h
View file @
25803c63
...
...
@@ -32,8 +32,6 @@ void cl_git_report_failure(int, const char *, int, const char *);
#define cl_assert_at_line(expr,file,line) \
clar__assert((expr) != 0, file, line, "Expression is not true: " #expr, NULL, 1)
#define cl_assert_equal_sz(sz1,sz2) clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, PRIuZ, (size_t)(sz1), (size_t)(sz2))
GIT_INLINE
(
void
)
clar__assert_in_range
(
int
lo
,
int
val
,
int
hi
,
const
char
*
file
,
int
line
,
const
char
*
err
,
int
should_abort
)
...
...
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