* @n Input data:
* @li Edje_External_Param_Type the identifier to convert.
* @procedure
- * @step 1 Create a variable of type Edje_External_Param_Type and assign a valid value.
- * @step 2 Pass the variable to edje_external_param_type_str function
+ * @step 1 Create a variable of type Edje_External_Param_Type.
+ * @step 2 Pass the variable to edje_external_param_type_str function.
+ * @step 3 Compare result with EDJE_EXTERNAL_PARAM_TYPE_STRING.
+ * @step 4 Create a variable of type Edje_External_Param_Type.
+ * @step 5 Pass the variable to edje_external_param_type_str function.
+ * @step 6 Compare result with EDJE_EXTERNAL_PARAM_TYPE_BOOL.
+ * @step 7 Create a variable of type Edje_External_Param_Type.
+ * @step 8 Pass the variable to edje_external_param_type_str function.
+ * @step 9 Compare result with EDJE_EXTERNAL_PARAM_TYPE_INT.
+ * @step 10 Create a variable of type Edje_External_Param_Type.
+ * @step 11 Pass the variable to edje_external_param_type_str function.
+ * @step 12 Compare result with EDJE_EXTERNAL_PARAM_TYPE_CHOICE.
+ * @step 13 Create a variable of type Edje_External_Param_Type.
+ * @step 14 Pass the variable to edje_external_param_type_str function.
+ * @step 15 Compare result with EDJE_EXTERNAL_PARAM_TYPE_DOUBLE.
*
* @passcondition : Returns corresponding string.
* @}
START_TEST(utc_edje_external_param_type_str_p)
{
const char *type_str = NULL;
- Edje_External_Param_Type type = EDJE_EXTERNAL_PARAM_TYPE_INT;
+ const char *type_bool = NULL;
+ const char *type_int = NULL;
+ const char *type_choice = NULL;
+ const char *type_double = NULL;
+ Edje_External_Param_Type type;
+ type = EDJE_EXTERNAL_PARAM_TYPE_STRING;
type_str = edje_external_param_type_str(type);
- if (!type_str)
+ if (strcmp(type_str, "STRING"))
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
}
+
+ type = EDJE_EXTERNAL_PARAM_TYPE_BOOL;
+ type_bool = edje_external_param_type_str(type);
+ if (strcmp(type_bool, "BOOL"))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ type = EDJE_EXTERNAL_PARAM_TYPE_INT;
+ type_int = edje_external_param_type_str(type);
+ if (strcmp(type_int, "INT"))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ type = EDJE_EXTERNAL_PARAM_TYPE_CHOICE;
+ type_choice = edje_external_param_type_str(type);
+ if (strcmp(type_choice, "CHOICE"))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
+ type_double = edje_external_param_type_str(type);
+ if (strcmp(type_double, "DOUBLE"))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
END_TEST
{
const char *type_str = NULL;
type_str = edje_external_param_type_str(-1);
- if (!type_str)
+ if (!type_str || strcmp(type_str, "(unknown)"))
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
}