(Touch) Updated programming guide, Automated Tests & KeyboardFocusManager to use...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-Alignment.cpp
index 7b5ff87..fc015f1 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) 2015 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>
 
 #include <iostream>
 #include <stdlib.h>
@@ -38,9 +39,14 @@ void utc_dali_toolkit_alignment_cleanup(void)
   test_return_value = TET_PASS;
 }
 
   test_return_value = TET_PASS;
 }
 
-
 namespace
 {
 namespace
 {
+/// Compare an int (Or'd Alignment::Type) with an Alignment::Type value
+void DALI_TEST_EQUALS( int value1, Alignment::Type value2, const char* location )
+{
+  ::DALI_TEST_EQUALS< Alignment::Type >( static_cast< Alignment::Type >( value1 ), value2, location );
+}
+
 static bool gObjectCreatedCallBackCalled;
 
 static void TestCallback(BaseHandle handle)
 static bool gObjectCreatedCallBackCalled;
 
 static void TestCallback(BaseHandle handle)
@@ -62,12 +68,9 @@ int UtcDaliAlignmentConstructorNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "alignment")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "alignment", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -234,7 +237,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
   {
     Alignment alignment = Alignment::New();
   // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -254,7 +257,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalLeft, VerticalCenter
   {
     Alignment alignment = Alignment::New();
   // HorizontalLeft, VerticalCenter
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -274,7 +277,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalRight, VerticalCenter
   {
     Alignment alignment = Alignment::New();
   // HorizontalRight, VerticalCenter
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -294,7 +297,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalLeft, VerticalTop
   {
     Alignment alignment = Alignment::New();
   // HorizontalLeft, VerticalTop
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -314,7 +317,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalCenter, VerticalTop
   {
     Alignment alignment = Alignment::New();
   // HorizontalCenter, VerticalTop
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -334,7 +337,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalRight, VerticalTop
   {
     Alignment alignment = Alignment::New();
   // HorizontalRight, VerticalTop
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -354,7 +357,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalLeft, VerticalBottom
   {
     Alignment alignment = Alignment::New();
   // HorizontalLeft, VerticalBottom
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -374,7 +377,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
   // HorizontalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -394,7 +397,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
   // HorizontalRight, VerticalBottom
   {
     Alignment alignment = Alignment::New();
   // HorizontalRight, VerticalBottom
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -421,19 +424,10 @@ int UtcDaliAlignmentSetAlignmentTypeNegative(void)
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::HorizontalCenter));
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::HorizontalCenter));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!horizontalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK( Alignment::HorizontalCenter & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::HorizontalLeft & alignment.GetAlignmentType()) );
   }
 
   // Setting HorizontalCenter, HorizontalRight
   }
 
   // Setting HorizontalCenter, HorizontalRight
@@ -441,56 +435,30 @@ int UtcDaliAlignmentSetAlignmentTypeNegative(void)
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::HorizontalRight));
 
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::HorizontalRight));
 
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!horizontalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK( Alignment::HorizontalCenter & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::HorizontalRight & alignment.GetAlignmentType()) );
   }
 
   // Setting VerticalTop, VerticalCenter
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalCenter));
   }
 
   // Setting VerticalTop, VerticalCenter
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalCenter));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!verticalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK( Alignment::VerticalCenter & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::VerticalTop & alignment.GetAlignmentType()) );
   }
 
   // Setting VerticalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalBottom));
   }
 
   // Setting VerticalCenter, VerticalBottom
   {
     Alignment alignment = Alignment::New();
     Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalBottom));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!veritcalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    alignment.SetAlignmentType(type);
+    // top will prevail in conflict
+    DALI_TEST_CHECK( Alignment::VerticalTop & alignment.GetAlignmentType() );
+    DALI_TEST_CHECK( !(Alignment::VerticalBottom & alignment.GetAlignmentType()) );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -503,7 +471,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New();
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New();
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -516,7 +484,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -529,7 +497,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -542,7 +510,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -555,7 +523,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -568,7 +536,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -581,7 +549,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -594,7 +562,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -607,7 +575,7 @@ int UtcDaliAlignmentGetAlignmentType(void)
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
   {
     Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
     DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -625,7 +593,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ScaleToFill
   {
     Alignment alignment = Alignment::New();
   // ScaleToFill
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -658,7 +626,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ScaleToFitKeepAspect
   {
     Alignment alignment = Alignment::New();
   // ScaleToFitKeepAspect
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -691,7 +659,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ScaleToFillKeepAspect
   {
     Alignment alignment = Alignment::New();
   // ScaleToFillKeepAspect
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -724,7 +692,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ShrinkToFit
   {
     Alignment alignment = Alignment::New();
   // ShrinkToFit
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -757,7 +725,7 @@ int UtcDaliAlignmentSetScaling(void)
   // ShrinkToFitKeepAspect
   {
     Alignment alignment = Alignment::New();
   // ShrinkToFitKeepAspect
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
+    alignment.Add(Actor::New());
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
     Stage::GetCurrent().Add(alignment);
     application.Render();
     application.SendNotification();
@@ -873,12 +841,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
 
   try
   }
 
   try
@@ -887,12 +852,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
 
   try
   }
 
   try
@@ -901,12 +863,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
 
   try
   }
 
   try
@@ -915,12 +874,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch (DaliException& e)
   {
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )", TEST_LOCATION );
   }
   END_TEST;
 }
   }
   END_TEST;
 }
@@ -954,7 +910,7 @@ int UtcDaliAlignmentChildAddAndRemove(void)
   application.Render();
   application.SendNotification();
 
   application.Render();
   application.SendNotification();
 
-  Actor actor = RenderableActor::New();
+  Actor actor = Actor::New();
   alignment.Add(actor);
 
   DALI_TEST_EQUALS(alignment.GetChildCount(), 1u, TEST_LOCATION);
   alignment.Add(actor);
 
   DALI_TEST_EQUALS(alignment.GetChildCount(), 1u, TEST_LOCATION);
@@ -973,7 +929,7 @@ int UtcDaliAlignmentChildAddAndRemove(void)
   END_TEST;
 }
 
   END_TEST;
 }
 
-int UtcDaliAlignmentOnSizeSet(void)
+int UtcDaliAlignmentSizeSetP(void)
 {
   ToolkitTestApplication application;
 
 {
   ToolkitTestApplication application;
 
@@ -983,7 +939,7 @@ int UtcDaliAlignmentOnSizeSet(void)
   application.Render();
   application.SendNotification();
 
   application.Render();
   application.SendNotification();
 
-  Vector3 size(100.0f, 200.0f, 0.0f);
+  Vector2 size( 100.0f, 200.0f );
   alignment.SetSize(size);
 
   application.Render();
   alignment.SetSize(size);
 
   application.Render();
@@ -991,14 +947,14 @@ int UtcDaliAlignmentOnSizeSet(void)
   application.Render();
   application.SendNotification();
 
   application.Render();
   application.SendNotification();
 
-  DALI_TEST_EQUALS(size, alignment.GetImplementation().GetControlSize(), TEST_LOCATION);
+  DALI_TEST_EQUALS(size, alignment.GetTargetSize().GetVectorXY(), TEST_LOCATION);
 
   Stage::GetCurrent().Remove(alignment);
   END_TEST;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 
   Stage::GetCurrent().Remove(alignment);
   END_TEST;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static bool TouchEventCallback(Actor actor, const TouchEvent& event)
+static bool TouchCallback(Actor actor, const TouchData& event)
 {
   return false;
 }
 {
   return false;
 }
@@ -1014,7 +970,7 @@ int UtcDaliAlignmentOnTouchEvent(void)
   alignment.SetAnchorPoint(AnchorPoint::TOP_LEFT);
   Stage::GetCurrent().Add(alignment);
 
   alignment.SetAnchorPoint(AnchorPoint::TOP_LEFT);
   Stage::GetCurrent().Add(alignment);
 
-  alignment.TouchedSignal().Connect(&TouchEventCallback);
+  alignment.TouchSignal().Connect(&TouchCallback);
 
   application.Render();
   application.SendNotification();
 
   application.Render();
   application.SendNotification();
@@ -1022,7 +978,10 @@ int UtcDaliAlignmentOnTouchEvent(void)
   application.SendNotification();
 
   Integration::TouchEvent touchEvent(1);
   application.SendNotification();
 
   Integration::TouchEvent touchEvent(1);
-  TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+  Integration::Point point;
+  point.SetDeviceId( 1 );
+  point.SetState( PointState::DOWN);
+  point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
   touchEvent.AddPoint(point);
   application.ProcessEvent(touchEvent);
 
   touchEvent.AddPoint(point);
   application.ProcessEvent(touchEvent);
 
@@ -1059,7 +1018,7 @@ int UtcDaliAlignmentOnSizeAnimation(void)
   Stage::GetCurrent().Add(alignment);
 
   Animation animation = Animation::New(100.0f);
   Stage::GetCurrent().Add(alignment);
 
   Animation animation = Animation::New(100.0f);
-  animation.Resize(alignment, Vector3(100.0f, 150.0f, 200.0f));
+  animation.AnimateTo( Property( alignment, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
   animation.Play();
 
   application.Render();
   animation.Play();
 
   application.Render();