[Colorselector]Implemented review comments
authorAmit Kumar Singh <ak.singh7@samsung.com>
Fri, 25 Mar 2011 11:32:08 +0000 (17:02 +0530)
committerAmit Kumar Singh <ak.singh7@samsung.com>
Fri, 25 Mar 2011 11:32:08 +0000 (17:02 +0530)
[Colorselector ]TC refactoring

Change-Id: I82f549706a2567e58edf399747d26124f7721d32

TC/elm_ts/colorselector/utc_UIFW_elm_colorselector_color_get_func.c
TC/elm_ts/colorselector/utc_UIFW_elm_colorselector_color_set_func.c

index 5d261d5..de6e492 100644 (file)
@@ -57,6 +57,7 @@ static void startup(void)
        main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
        evas_object_show(main_win);     
        colorselector = elm_colorselector_add(main_win);
+       elm_colorselector_color_set(colorselector, 255, 255, 255, 255);
        evas_object_show(colorselector);
 }
 
@@ -79,9 +80,12 @@ static void cleanup(void)
  */
 static void utc_UIFW_elm_colorselector_color_get_func_01(void)
 {
-       int r, g, b, a;
-       elm_colorselector_color_get(colorselector, &r, &g, &b, &a);
-       tet_result(TET_PASS);
+   int r, g, b, a;
+   elm_colorselector_color_get(colorselector, &r, &g, &b, &a);
+   if( (r == 255) && (g == 255) && (b == 255) && (a == 255) )
+     tet_result(TET_PASS);
+   else
+     tet_result(TET_FAIL);
 }
 
 /**
@@ -89,7 +93,11 @@ static void utc_UIFW_elm_colorselector_color_get_func_01(void)
  */
 static void utc_UIFW_elm_colorselector_color_get_func_02(void)
 {
-       int r, g, b, a;
-       elm_colorselector_color_get(NULL, &r, &g, &b, &a);
-       tet_result(TET_PASS);
+   int r, g, b, a;
+   r = g = b = a = -1;
+   elm_colorselector_color_get(NULL, &r, &g, &b, &a);
+   if( (r == -1) && (g == -1) && (b == -1) && (a == -1) )
+     tet_result(TET_PASS);
+   else
+     tet_result(TET_FAIL);
 }
index 4ad4c09..272145e 100644 (file)
@@ -79,8 +79,14 @@ static void cleanup(void)
  */
 static void utc_UIFW_elm_colorselector_color_set_func_01(void)
 {
-       elm_colorselector_color_set(colorselector, 255, 255, 255, 255);
-       tet_result(TET_PASS);
+   int r, g, b, a;
+   r = g = b = a = -1;
+   elm_colorselector_color_set(colorselector, 255, 255, 255, 255);
+   elm_colorselector_color_get(colorselector, &r, &g, &b, &a);
+   if( (r == 255) && (g == 255) && (b == 255) && (a == 255) )
+     tet_result(TET_PASS);
+   else
+     tet_result(TET_FAIL);
 }
 
 /**
@@ -88,6 +94,6 @@ static void utc_UIFW_elm_colorselector_color_set_func_01(void)
  */
 static void utc_UIFW_elm_colorselector_color_set_func_02(void)
 {
-       elm_colorselector_color_set(NULL, 255, 255, 255, 255);
-       tet_result(TET_PASS);
+   elm_colorselector_color_set(NULL, -1, -1, -1, -1);
+   tet_result(TET_PASS);
 }