e-tizen-testcase: remove debug msg and rename internal values 79/171979/3
authorJunSeok, Kim <juns.kim@samsung.com>
Thu, 8 Mar 2018 10:44:28 +0000 (19:44 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 8 Mar 2018 12:00:55 +0000 (12:00 +0000)
Change-Id: I44343ed986bf93fb5691526526b94a67b93b56fa

src/e_test_event.cpp
src/e_test_event.h
src/testcase/0006_tzsh.cpp
src/testcase/0007_rotation.cpp

index fca38b6..be51cfb 100644 (file)
@@ -665,9 +665,6 @@ void EtEventLoop::RunTimer()
 
 void EtEventLoop::WaitForDestroy()
 {
-   printf("###########################\n");
-   printf("Destroy Wait Timer Start!!!\n");
-   printf("###########################\n");
    this->SetWaitWorkTime(E_TEST_WORK_TIME);
    this->RunTimer();
    elm_run();
index 87e4f25..c7210a1 100644 (file)
@@ -40,8 +40,6 @@ class EtEventLoop
     ~EtEventLoop();
 
     /* requests */
-    Eina_Bool     Init();
-    void          Shutdown();
     Eina_Bool     RegisterWin(EtWin *tw);
     Eina_Bool     DeregisterWin(EtWin *tw);
     Eina_Bool     SetWinStack(EtWin *tw,
@@ -74,6 +72,8 @@ class EtEventLoop
     Eina_Bool     WaitEvent(E_TC_Event_Type ev);
 
     /* methods */
+    Eina_Bool     Init();
+    void          Shutdown();
     void          Work();
     void          PrintWinInfoList();
     void          SetWaitWorkTime(double time) { this->time_for_wait_work_ = time; };
index 051af1c..05ff65e 100644 (file)
@@ -29,47 +29,47 @@ class EtTestTzsh : public :: testing::Test
          chk_ev_state_not_idle_ = EINA_FALSE;
          chk_cb_called_ = 0;
       };
-   ~EtTestTzsh()
+    ~EtTestTzsh()
       {
          gLoop->WaitForDestroy();
 
          if (tz_scrsaver_mng)
-              tzsh_screensaver_manager_service_destroy(tz_scrsaver_mng);
+           tzsh_screensaver_manager_service_destroy(tz_scrsaver_mng);
 
          if (tz_scrsaver)
-              tzsh_screensaver_service_destroy(tz_scrsaver);
+           tzsh_screensaver_service_destroy(tz_scrsaver);
 
          if (tzsh)
-              tzsh_destroy(tzsh);
+           tzsh_destroy(tzsh);
 
-         if (tw)
+         if (tw_base)
            {
-              gLoop->DeregisterWin(tw);
-              delete tw;
+              gLoop->DeregisterWin(tw_base);
+              delete tw_base;
            }
 
          if (gLoop->HasLastWinInfoList())
            gLoop->FreeLastWinInfoList();
       };
  protected:
-    EtWin     *tw = NULL;
+    EtWin     *tw_base = NULL;
 
     Eina_Bool  InitTC()
       {
          Eina_Bool result = EINA_FALSE;
 
-         this->tw = new EtWin();
-         result = this->tw->Init(NULL,
-                                 ELM_WIN_BASIC,
-                                 EINA_FALSE,
-                                 "EtWin Tzsh",
-                                 0, 0, 0, 0, EINA_FALSE,
-                                 (E_Layer) 0,
-                                 E_TC_WIN_COLOR_RED);
+         this->tw_base = new EtWin();
+         result = this->tw_base->Init(NULL,
+                                      ELM_WIN_BASIC,
+                                      EINA_FALSE,
+                                      "EtWin Tzsh",
+                                      0, 0, 0, 0, EINA_FALSE,
+                                      (E_Layer) 0,
+                                      E_TC_WIN_COLOR_RED);
          EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
-         this->tw->native_win = gLoop->GetWinId(this->tw->elm_win);
+         this->tw_base->native_win = gLoop->GetWinId(this->tw_base->elm_win);
 
-         result = gLoop->RegisterWin(this->tw);
+         result = gLoop->RegisterWin(this->tw_base);
          EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
 
          return EINA_TRUE;
@@ -77,8 +77,8 @@ class EtTestTzsh : public :: testing::Test
 };
 
 /******************
-     callbacks
-*******************/
+  callbacks
+ *******************/
 static void
 _cb_state_change(void *data,
                  tzsh_screensaver_manager_service_h service,
@@ -145,14 +145,14 @@ TEST_F(EtTestTzsh, scrsaver_basic)
    this->tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
    ASSERT_TRUE(this->tzsh != NULL);
 
-   this->tz_win = elm_win_window_id_get(this->tw->elm_win);
+   this->tz_win = elm_win_window_id_get(this->tw_base->elm_win);
    ASSERT_NE(0, this->tz_win);
 
    this->tz_scrsaver = tzsh_screensaver_service_create(this->tzsh, this->tz_win);
    ASSERT_TRUE(tz_scrsaver != NULL);
 
-   this->tw->UpdateGeometry();
-   this->tw->Show();
+   this->tw_base->UpdateGeometry();
+   this->tw_base->Show();
    gLoop->WaitEvent(E_TC_EVENT_TYPE_VIS_ON);
 
    list = gLoop->GetWinInfoList();
@@ -160,7 +160,7 @@ TEST_F(EtTestTzsh, scrsaver_basic)
 
    EINA_LIST_CAST_FOREACH(list, l, tw, EtWin*)
      {
-        if (tw->native_win != this->tw->native_win)
+        if (tw->native_win != this->tw_base->native_win)
           continue;
 
         // check layer
@@ -207,7 +207,7 @@ TEST_F(EtTestTzsh, scrsaver_mng_basic)
    this->tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
    ASSERT_TRUE(this->tzsh != NULL);
 
-   this->tz_win = elm_win_window_id_get(this->tw->elm_win);
+   this->tz_win = elm_win_window_id_get(this->tw_base->elm_win);
    ASSERT_NE(0, this->tz_win);
 
    this->tz_scrsaver_mng = tzsh_screensaver_manager_service_create(this->tzsh, this->tz_win);
index 3566125..05b589a 100644 (file)
@@ -15,11 +15,11 @@ class EtTestRotation : public ::testing::Test
          gLoop->WaitForDestroy();
 
          if (tw_register)
-              gLoop->DeregisterWin(tw_register);
+           gLoop->DeregisterWin(tw_register);
 
-         if (tw)
+         if (tw_base)
            {
-              delete tw;
+              delete tw_base;
            }
 
          if (gLoop->HasLastWinInfoList())
@@ -28,41 +28,41 @@ class EtTestRotation : public ::testing::Test
 
  protected:
     const int rots[4] = {0, 90, 180, 270};
-    EtWin *tw = NULL;
+    EtWin *tw_base = NULL;
     EtWin *tw_register = NULL;
 
     int saved_rot_ = 0;
 
     Eina_Bool InitTC()
-       {
-          Eina_Bool result = EINA_FALSE;
+      {
+         Eina_Bool result = EINA_FALSE;
 
-          this->tw = new EtWin();
-          result = this->tw->Init(NULL,
-                                  ELM_WIN_BASIC,
-                                  EINA_FALSE,
-                                  "EtWin Rotation",
-                                  0, 0, 400, 400, EINA_FALSE,
-                                  E_LAYER_CLIENT_NORMAL,
-                                  E_TC_WIN_COLOR_BLUE);
-          EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
-          this->tw->native_win = gLoop->GetWinId(this->tw->elm_win);
+         this->tw_base = new EtWin();
+         result = this->tw_base->Init(NULL,
+                                      ELM_WIN_BASIC,
+                                      EINA_FALSE,
+                                      "EtWin Rotation",
+                                      0, 0, 400, 400, EINA_FALSE,
+                                      E_LAYER_CLIENT_NORMAL,
+                                      E_TC_WIN_COLOR_BLUE);
+         EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
+         this->tw_base->native_win = gLoop->GetWinId(this->tw_base->elm_win);
 
-          // available rotations
-          elm_win_wm_rotation_available_rotations_set(this->tw->elm_win,
-                                                      this->rots, 4);
+         // available rotations
+         elm_win_wm_rotation_available_rotations_set(this->tw_base->elm_win,
+                                                     this->rots, 4);
 
-          result = gLoop->RegisterWin(this->tw);
-          EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
+         result = gLoop->RegisterWin(this->tw_base);
+         EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
 
-          this->tw_register = this->tw;
+         this->tw_register = this->tw_base;
 
-          this->tw->UpdateGeometry();
-          this->tw->Show();
-          gLoop->WaitEvent(E_TC_EVENT_TYPE_VIS_ON);
+         this->tw_base->UpdateGeometry();
+         this->tw_base->Show();
+         gLoop->WaitEvent(E_TC_EVENT_TYPE_VIS_ON);
 
-          return EINA_TRUE;
-       };
+         return EINA_TRUE;
+      };
 
     Eina_Bool TestWinRotation(EtWin *tw, int rot)
       {
@@ -100,10 +100,10 @@ TEST_F(EtTestRotation, available_rotations)
    result = this->InitTC();
    ASSERT_TRUE(result);
 
-   result = gLoop->GetWinInfo(this->tw);
+   result = gLoop->GetWinInfo(this->tw_base);
    ASSERT_TRUE(result);
 
-   this->saved_rot_ = this->tw->rot;
+   this->saved_rot_ = this->tw_base->rot;
 
    for (rot = ((this->saved_rot_ + 90) % 360);
         rot == this->saved_rot_;
@@ -112,7 +112,7 @@ TEST_F(EtTestRotation, available_rotations)
         /* hard coded, reverse portrait(180) mode is disabled in mobile */
         if (rot == 180) continue;
 
-        result = this->TestWinRotation(this->tw, rot);
+        result = this->TestWinRotation(this->tw_base, rot);
         ASSERT_TRUE(result);
      }
 }