Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-26 06:58:49 +0300
committerCampbell Barton <campbell@blender.org>2022-09-26 07:12:38 +0300
commit6275541df7e02c40e8c8650bba3104b5df8d34ef (patch)
tree042b852b57a56c9423eb58bc1b7afe1c7c2188fa /source/blender/blenlib/tests
parent96d88e56143b1972d9b0cd6c53c6e0cda9b62269 (diff)
Cleanup: use ELEM/STR_ELEM/STREQ macros
Diffstat (limited to 'source/blender/blenlib/tests')
-rw-r--r--source/blender/blenlib/tests/BLI_listbase_test.cc4
-rw-r--r--source/blender/blenlib/tests/BLI_path_util_test.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/tests/BLI_listbase_test.cc b/source/blender/blenlib/tests/BLI_listbase_test.cc
index aa2f885e39d..abdd4f90221 100644
--- a/source/blender/blenlib/tests/BLI_listbase_test.cc
+++ b/source/blender/blenlib/tests/BLI_listbase_test.cc
@@ -222,7 +222,7 @@ static bool testsort_listbase_array_str_cmp(ListBase *lb, char **arr, int arr_nu
link_step = (LinkData *)lb->first;
for (i = 0; i < arr_num; i++) {
- if (strcmp(arr[i], (char *)link_step->data) != 0) {
+ if (!STREQ(arr[i], (char *)link_step->data)) {
return false;
}
link_step = link_step->next;
@@ -241,7 +241,7 @@ static bool testsort_listbase_sort_is_stable(ListBase *lb, bool forward)
link_step = (LinkData *)lb->first;
while (link_step && link_step->next) {
- if (strcmp((const char *)link_step->data, (const char *)link_step->next->data) == 0) {
+ if (STREQ((const char *)link_step->data, (const char *)link_step->next->data)) {
if ((link_step < link_step->next) != forward) {
return false;
}
diff --git a/source/blender/blenlib/tests/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc
index 5ea6524f835..2d415534693 100644
--- a/source/blender/blenlib/tests/BLI_path_util_test.cc
+++ b/source/blender/blenlib/tests/BLI_path_util_test.cc
@@ -466,7 +466,7 @@ TEST(path_util, PathFrameStrip)
#define PATH_EXTENSION_CHECK(input_path, input_ext, expect_ext) \
{ \
const bool ret = BLI_path_extension_check(input_path, input_ext); \
- if (strcmp(input_ext, expect_ext) == 0) { \
+ if (STREQ(input_ext, expect_ext)) { \
EXPECT_TRUE(ret); \
} \
else { \