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_true
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
89f58decb6
commit
603b6d7222
@ -58,11 +58,11 @@ static void torture_basename(void **state) {
|
||||
(void) state;
|
||||
|
||||
path=ssh_basename(TORTURE_TEST_DIR "/test");
|
||||
assert_true(path != NULL);
|
||||
assert_non_null(path);
|
||||
assert_string_equal(path, "test");
|
||||
SAFE_FREE(path);
|
||||
path=ssh_basename(TORTURE_TEST_DIR "/test/");
|
||||
assert_true(path != NULL);
|
||||
assert_non_null(path);
|
||||
assert_string_equal(path, "test");
|
||||
SAFE_FREE(path);
|
||||
}
|
||||
@ -73,11 +73,11 @@ static void torture_dirname(void **state) {
|
||||
(void) state;
|
||||
|
||||
path=ssh_dirname(TORTURE_TEST_DIR "/test");
|
||||
assert_true(path != NULL);
|
||||
assert_non_null(path);
|
||||
assert_string_equal(path, TORTURE_TEST_DIR );
|
||||
SAFE_FREE(path);
|
||||
path=ssh_dirname(TORTURE_TEST_DIR "/test/");
|
||||
assert_true(path != NULL);
|
||||
assert_non_null(path);
|
||||
assert_string_equal(path, TORTURE_TEST_DIR);
|
||||
SAFE_FREE(path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user