mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +03:00
tests: Prefer assert_non_null() over assert_false()
This also replaces some occurrences of assert_true() with assert_null() Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
bdf968c178
commit
27caaa000b
@ -44,7 +44,7 @@ static void torture_get_user_home_dir(void **state) {
|
||||
(void) state;
|
||||
|
||||
user = ssh_get_user_home_dir();
|
||||
assert_false(user == NULL);
|
||||
assert_non_null(user);
|
||||
#ifndef _WIN32
|
||||
assert_string_equal(user, pwd->pw_dir);
|
||||
#endif /* _WIN32 */
|
||||
@ -109,7 +109,7 @@ static void torture_path_expand_tilde_win(void **state) {
|
||||
(void) state;
|
||||
|
||||
d = ssh_path_expand_tilde("~\\.ssh");
|
||||
assert_false(d == NULL);
|
||||
assert_non_null(d);
|
||||
print_message("Expanded path: %s\n", d);
|
||||
free(d);
|
||||
|
||||
|
Reference in New Issue
Block a user