diff --git a/libs/utils/gtest/src/ArrayListTestSuite.cc b/libs/utils/gtest/src/ArrayListTestSuite.cc index 7af65ac5a..c9219b9fb 100644 --- a/libs/utils/gtest/src/ArrayListTestSuite.cc +++ b/libs/utils/gtest/src/ArrayListTestSuite.cc @@ -497,18 +497,13 @@ TEST_F(ArrayListTestSuite, ReallocTest) { } TEST_F(ArrayListTestSuite, ElementTypeToStringTest) { - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED", - celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED)); - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_POINTER", - celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_POINTER)); - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_STRING", - celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_STRING)); - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_LONG", - celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_LONG)); - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_DOUBLE", - celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_DOUBLE)); - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_BOOL", - celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_BOOL)); - EXPECT_STREQ("CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED", + EXPECT_STREQ("Undefined", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED)); + EXPECT_STREQ("Pointer", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_POINTER)); + EXPECT_STREQ("String", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_STRING)); + EXPECT_STREQ("Long", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_LONG)); + EXPECT_STREQ("Double", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_DOUBLE)); + EXPECT_STREQ("Bool", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_BOOL)); + EXPECT_STREQ("Version", celix_arrayList_elementTypeToString(CELIX_ARRAY_LIST_ELEMENT_TYPE_VERSION)); + EXPECT_STREQ("Undefined", celix_arrayList_elementTypeToString((celix_array_list_element_type_t)100 /*non existing*/)); } diff --git a/libs/utils/src/array_list.c b/libs/utils/src/array_list.c index f4cdcd36c..361525f2e 100644 --- a/libs/utils/src/array_list.c +++ b/libs/utils/src/array_list.c @@ -28,13 +28,13 @@ #include "celix_utils.h" #include "celix_version.h" -#define STRING_VALUE_UNDEFINED_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED" -#define STRING_VALUE_POINTER_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_POINTER" -#define STRING_VALUE_STRING_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_STRING" -#define STRING_VALUE_LONG_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_LONG" -#define STRING_VALUE_DOUBLE_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_DOUBLE" -#define STRING_VALUE_BOOL_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_BOOL" -#define STRING_VALUE_VERSION_EL_TYPE "CELIX_ARRAY_LIST_ELEMENT_TYPE_VERSION" +#define STRING_VALUE_UNDEFINED_EL_TYPE "Undefined" +#define STRING_VALUE_POINTER_EL_TYPE "Pointer" +#define STRING_VALUE_STRING_EL_TYPE "String" +#define STRING_VALUE_LONG_EL_TYPE "Long" +#define STRING_VALUE_DOUBLE_EL_TYPE "Double" +#define STRING_VALUE_BOOL_EL_TYPE "Bool" +#define STRING_VALUE_VERSION_EL_TYPE "Version" struct celix_array_list { celix_array_list_element_type_t elementType;