aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests/torture_misc.c
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-01-15 11:19:49 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-26 13:56:22 +0100
commit603b6d7222703257997962b7181858c49845082e (patch)
tree43c5871354ef18b2faf49e78425acb8433e69603 /tests/unittests/torture_misc.c
parent89f58decb6e0ecadb37ab77c471ec780203fcd17 (diff)
downloadlibssh-603b6d7222703257997962b7181858c49845082e.tar.gz
libssh-603b6d7222703257997962b7181858c49845082e.tar.xz
libssh-603b6d7222703257997962b7181858c49845082e.zip
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>
Diffstat (limited to 'tests/unittests/torture_misc.c')
-rw-r--r--tests/unittests/torture_misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/torture_misc.c b/tests/unittests/torture_misc.c
index f6b39e90..b891ed68 100644
--- a/tests/unittests/torture_misc.c
+++ b/tests/unittests/torture_misc.c
@@ -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);
}