elm_theme: fix wrong TC 76/206076/2
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 14 May 2019 05:53:01 +0000 (14:53 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 14 May 2019 06:08:59 +0000 (15:08 +0900)
default theme does not always contain the "default" string.
this causes TC fail in wearable profile.

Change-Id: I8891d952eeb980ead5f95dcae074a7390b9403b7
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
TC/elementary/theme/utc_elm_theme_get.c

index bb8cda72524dca29391f8899592b874c362c20da..eef7855c913ef810b48acaa808dc0ca6291b3234 100644 (file)
@@ -67,12 +67,13 @@ teardown(void)
  * @procedure
  * @step 1 Get the theme search order for default theme
  *
- * @passcondition Returned string contains "default" and there is no segmentation fault
+ * @passcondition Returned string of 1 to 256 size, not NULL and there is no segmentation fault
  * @}
  */
 START_TEST(utc_elm_theme_get_p)
 {
    const char * themeorder = NULL;
+   int len;
 
    themeorder = elm_theme_get(NULL);
    if (themeorder == NULL)
@@ -80,9 +81,10 @@ START_TEST(utc_elm_theme_get_p)
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, returned value is NULL..", __FILE__, __LINE__);
         return;
      }
-   if (strstr(themeorder, "default") == NULL)
+   len = strlen(themeorder);
+   if (len < 0 || len > 256)
      {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, incorrect theme name has received..", __FILE__, __LINE__);
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, incorrect theme size has received..", __FILE__, __LINE__);
         return;
      }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);