From d8d267e1f03e1db17ad5d9d5dc6635693833d130 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Thu, 23 Feb 2017 20:45:09 +0200 Subject: [PATCH] ASSERT_FALSE(expr == NULL) -> ASSERT(expr) Simplify assert calls to improve code readability. --- test/option_parser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/option_parser.c b/test/option_parser.c index 4ca39ca..8147136 100644 --- a/test/option_parser.c +++ b/test/option_parser.c @@ -133,14 +133,14 @@ TEST test_cmdline_create_usage(void) cmdline_get_double("-msgdouble/-md", 0, "A double to test usage creation"); cmdline_get_bool("-msgbool/-mb", false, "A bool to test usage creation"); char *usage = cmdline_create_usage(); - ASSERT_FALSE(strstr(usage, "-msgstring/-ms") == NULL); - ASSERT_FALSE(strstr(usage, "A string to test usage creation") == NULL); - ASSERT_FALSE(strstr(usage, "-msgint/-mi") == NULL); - ASSERT_FALSE(strstr(usage, "An int to test usage creation") == NULL); - ASSERT_FALSE(strstr(usage, "-msgdouble/-md") == NULL); - ASSERT_FALSE(strstr(usage, "A double to test usage creation") == NULL); - ASSERT_FALSE(strstr(usage, "-msgbool/-mb") == NULL); - ASSERT_FALSE(strstr(usage, "A bool to test usage creation") == NULL); + ASSERT(strstr(usage, "-msgstring/-ms")); + ASSERT(strstr(usage, "A string to test usage creation")); + ASSERT(strstr(usage, "-msgint/-mi")); + ASSERT(strstr(usage, "An int to test usage creation")); + ASSERT(strstr(usage, "-msgdouble/-md")); + ASSERT(strstr(usage, "A double to test usage creation")); + ASSERT(strstr(usage, "-msgbool/-mb")); + ASSERT(strstr(usage, "A bool to test usage creation")); free(usage); PASS(); }