From a7e98211f9aa12617d7aef47801186e63deeac92 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 9 Feb 2025 16:41:29 +0000 Subject: [PATCH] Update find and rfind tests --- tests/str8/test_str8.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/str8/test_str8.c b/tests/str8/test_str8.c index f77b81f..08caa7f 100644 --- a/tests/str8/test_str8.c +++ b/tests/str8/test_str8.c @@ -143,10 +143,10 @@ TestFuncResult test_str8_set(void) { } TestFuncResult test_str8_find(void) { - bool result = true; - Str8RO s = wapp_str8_lit("Do as I say, not as I do"); + bool result; + Str8RO s = wapp_str8_lit("Do as I say, not as I do"); - result = result && (wapp_str8_find(&s, wapp_str8_lit_ro("d")) != -1); + result = wapp_str8_find(&s, wapp_str8_lit_ro("d")) != -1; result = result && (wapp_str8_find(&s, wapp_str8_lit_ro("not")) != -1); result = result && (wapp_str8_find(&s, wapp_str8_lit_ro("as I say")) != -1); @@ -159,10 +159,10 @@ TestFuncResult test_str8_find(void) { } TestFuncResult test_str8_rfind(void) { - bool result = true; - Str8RO s = wapp_str8_lit("Do as I say, not as I do"); + bool result; + Str8RO s = wapp_str8_lit("Do as I say, not as I do"); - result = result && (wapp_str8_rfind(&s, wapp_str8_lit_ro("d")) != -1); + result = wapp_str8_rfind(&s, wapp_str8_lit_ro("d")) != -1; result = result && (wapp_str8_rfind(&s, wapp_str8_lit_ro("not")) != -1); result = result && (wapp_str8_rfind(&s, wapp_str8_lit_ro("as I say")) != -1);