Eina test model: Use EINA_VALUE_STRUCT_MEMBER and the new EINA_C_ARRAY_LENGTH.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 Jan 2012 15:38:04 +0000 (15:38 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 Jan 2012 15:38:04 +0000 (15:38 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@67590 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/tests/eina_test_model.c

index ba6342c..1862b0f 100644 (file)
@@ -748,13 +748,12 @@ START_TEST(eina_model_test_struct)
       char c;
    };
    const Eina_Value_Struct_Member myst_members[] = {
-     {"i", EINA_VALUE_TYPE_INT, offsetof(struct myst, i)},
-     {"c", EINA_VALUE_TYPE_CHAR, offsetof(struct myst, c)}
+        EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, i),
+        EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_CHAR, struct myst, c)
    };
    const Eina_Value_Struct_Desc myst_desc = {
      EINA_VALUE_STRUCT_DESC_VERSION,
-     NULL, myst_members, sizeof(myst_members) / sizeof(myst_members[0]),
-     sizeof(struct myst)
+     NULL, myst_members, EINA_C_ARRAY_LENGTH(myst_members), sizeof(struct myst)
    };
    Eina_Value inv, outv;
    int i;