Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-PushButton.cpp
index 26abdea..f059594 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 #include <iostream>
 #include <stdlib.h>
@@ -72,9 +73,6 @@ const Dali::TouchPoint pointMotionOut( 0, TouchPoint::Motion, 10, 10 );
 const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10, 10 );
 const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10, 10 );
 
-static bool gOnTouchPointInterrupted = false;
-
-
 Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned int height )
 {
   BitmapImage imageData = BitmapImage::New( width, height, Pixel::RGBA8888 );
@@ -253,8 +251,8 @@ int UtcDaliPushButtonSetGetAutorepeatingDelayValues02(void)
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "initialAutoRepeatingDelay > 0.f", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "initialAutoRepeatingDelay > 0.f", TEST_LOCATION);
     assert1 = true;
   }
 
@@ -264,8 +262,8 @@ int UtcDaliPushButtonSetGetAutorepeatingDelayValues02(void)
   }
   catch( Dali::DaliException& e )
   {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_EQUALS(e.mCondition, "nextAutoRepeatingDelay > 0.f", TEST_LOCATION);
+    DALI_TEST_PRINT_ASSERT( e );
+    DALI_TEST_EQUALS(e.condition, "nextAutoRepeatingDelay > 0.f", TEST_LOCATION);
     assert2 = true;
   }
 
@@ -422,18 +420,8 @@ int UtcDaliPushButtonSetLabelText(void)
   application.SendNotification();
   application.Render();
 
-  TextView textView;
-
   pushButton.SetLabelText( STR );
 
-  textView = TextView::DownCast( pushButton.GetLabelText() );
-  DALI_TEST_CHECK( STR == textView.GetText() );
-
-  TextView text = TextView::New( STR );
-  pushButton.SetLabelText( text );
-
-  textView = TextView::DownCast( pushButton.GetLabelText() );
-  DALI_TEST_CHECK( STR == textView.GetText() );
   END_TEST;
 }