test: Apply semantic patch file ztest_strcmp.cocci

This patch file updates the use of assertion macros
comparing strings.

Command line used:
```
./scripts/coccicheck --mode=patch \
--cocci=scripts/coccinelle/ztest_strcmp.cocci tests/
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit is contained in:
Rubin Gerritsen 2024-06-11 14:39:44 +02:00 committed by Alberto Escolar
commit 8799ab1ec2
33 changed files with 227 additions and 268 deletions

View file

@ -67,7 +67,7 @@ ZTEST(nanopb_tests, test_nanopb_nested)
zassert_equal(42, msg.nested.id);
zassert_true(msg.has_nested);
zassert_equal(0, strcmp(msg.nested.name, "Test name"));
zassert_str_equal(msg.nested.name, "Test name");
}
ZTEST(nanopb_tests, test_nanopb_lib)