From bdf7026e9557349cd3eeb291c01655d5f2a55db8 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Sat, 4 Oct 2014 23:51:45 +0200 Subject: test: only use assert_se The asserts used in the tests should never be allowed to be optimized away --- src/test/test-strv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/test-strv.c') diff --git a/src/test/test-strv.c b/src/test/test-strv.c index 7ba4c366ac..bbfe306d7d 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -170,7 +170,7 @@ static void test_strv_unquote(const char *quoted, const char **list) { assert_se(r == 0); assert_se(s); j = strv_join(s, " | "); - assert(j); + assert_se(j); puts(j); STRV_FOREACH(t, s) @@ -184,8 +184,8 @@ static void test_invalid_unquote(const char *quoted) { int r; r = strv_split_quoted(&s, quoted); - assert(s == NULL); - assert(r == -EINVAL); + assert_se(s == NULL); + assert_se(r == -EINVAL); } static void test_strv_split(void) { @@ -196,7 +196,7 @@ static void test_strv_split(void) { l = strv_split(str, ","); - assert(l); + assert_se(l); STRV_FOREACH(s, l) { assert_se(streq(*s, input_table_multiple[i++])); @@ -211,7 +211,7 @@ static void test_strv_split_newlines(void) { l = strv_split_newlines(str); - assert(l); + assert_se(l); STRV_FOREACH(s, l) { assert_se(streq(*s, input_table_multiple[i++])); -- cgit v1.2.3-54-g00ecf