Update find and rfind tests

This commit is contained in:
Abdelrahman Said 2025-02-09 16:41:29 +00:00
parent 4642361969
commit a7e98211f9

View File

@ -143,10 +143,10 @@ TestFuncResult test_str8_set(void) {
}
TestFuncResult test_str8_find(void) {
bool result = true;
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;
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);