mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
Pass (u)intmax_t
instead of (u)int64_t
to check_(u)int_eq
(libtest)
This commit is contained in:
parent
7a238e7c65
commit
c071f824ec
2 changed files with 6 additions and 6 deletions
|
@ -82,7 +82,7 @@ bool check_str_eq_impl(char const* file, int line, char const* expected, char co
|
||||||
return pass;
|
return pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool check_int_eq_impl(char const* file, int line, int64_t expected, int64_t actual)
|
bool check_int_eq_impl(char const* file, int line, intmax_t expected, intmax_t actual)
|
||||||
{
|
{
|
||||||
bool const pass = expected == actual;
|
bool const pass = expected == actual;
|
||||||
|
|
||||||
|
@ -94,14 +94,14 @@ bool check_int_eq_impl(char const* file, int line, int64_t expected, int64_t act
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "FAIL %s:%d, expected \"%" PRId64 "\", got \"%" PRId64 "\"\n", file, line, expected, actual);
|
fprintf(stderr, "FAIL %s:%d, expected \"%jd\", got \"%jd\"\n", file, line, expected, actual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pass;
|
return pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool check_uint_eq_impl(char const* file, int line, uint64_t expected, uint64_t actual)
|
bool check_uint_eq_impl(char const* file, int line, uintmax_t expected, uintmax_t actual)
|
||||||
{
|
{
|
||||||
bool const pass = expected == actual;
|
bool const pass = expected == actual;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ bool check_uint_eq_impl(char const* file, int line, uint64_t expected, uint64_t
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "FAIL %s:%d, expected \"%" PRIu64 "\", got \"%" PRIu64 "\"\n", file, line, expected, actual);
|
fprintf(stderr, "FAIL %s:%d, expected \"%ju\", got \"%ju\"\n", file, line, expected, actual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ extern bool verbose;
|
||||||
bool should_print(bool pass);
|
bool should_print(bool pass);
|
||||||
|
|
||||||
bool check_condition_impl(char const* file, int line, bool condition);
|
bool check_condition_impl(char const* file, int line, bool condition);
|
||||||
bool check_int_eq_impl(char const* file, int line, int64_t expected, int64_t actual);
|
bool check_int_eq_impl(char const* file, int line, intmax_t expected, intmax_t actual);
|
||||||
bool check_uint_eq_impl(char const* file, int line, uint64_t expected, uint64_t actual);
|
bool check_uint_eq_impl(char const* file, int line, uintmax_t expected, uintmax_t actual);
|
||||||
bool check_ptr_eq_impl(char const* file, int line, void const* expected, void const* actual);
|
bool check_ptr_eq_impl(char const* file, int line, void const* expected, void const* actual);
|
||||||
bool check_str_eq_impl(char const* file, int line, char const* expected, char const* actual);
|
bool check_str_eq_impl(char const* file, int line, char const* expected, char const* actual);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue