(AutomatedTests) Move devel-api dependent tests to internal tests 81/40081/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 May 2015 14:50:35 +0000 (15:50 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 May 2015 14:51:07 +0000 (15:51 +0100)
TODO:
 - Stage: Move Dynamics API to Dynamics World
 - RenderTask: Uses HitTestAlgorithm, need to modify that test
 - TestNativeImage: Uses devel-api and is included by several image tests

Change-Id: I6f96b4d876c2418d3df99187786347ddd79defcd

27 files changed:
automated-tests/src/dali-internal/CMakeLists.txt
automated-tests/src/dali-internal/mesh-builder.cpp [moved from automated-tests/src/dali/dali-test-suite-utils/mesh-builder.cpp with 100% similarity]
automated-tests/src/dali-internal/mesh-builder.h [moved from automated-tests/src/dali/dali-test-suite-utils/mesh-builder.h with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-AnimatableMesh.cpp [moved from automated-tests/src/dali/utc-Dali-AnimatableMesh.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Atlas.cpp [moved from automated-tests/src/dali/utc-Dali-Atlas.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Constrainer.cpp [moved from automated-tests/src/dali/utc-Dali-Constrainer.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Context.cpp [moved from automated-tests/src/dali/utc-Dali-Context.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DistanceField.cpp [moved from automated-tests/src/dali/utc-Dali-DistanceField.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DynamicsBody.cpp [moved from automated-tests/src/dali/utc-Dali-DynamicsBody.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DynamicsBodyConfig.cpp [moved from automated-tests/src/dali/utc-Dali-DynamicsBodyConfig.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DynamicsJoint.cpp [moved from automated-tests/src/dali/utc-Dali-DynamicsJoint.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DynamicsShape.cpp [moved from automated-tests/src/dali/utc-Dali-DynamicsShape.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DynamicsWorld.cpp [moved from automated-tests/src/dali/utc-Dali-DynamicsWorld.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-DynamicsWorldConfig.cpp [moved from automated-tests/src/dali/utc-Dali-DynamicsWorldConfig.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Hash.cpp [moved from automated-tests/src/dali/utc-Dali-Hash.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-HitTestAlgorithm.cpp [moved from automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Internal-Constraint.cpp [deleted file]
automated-tests/src/dali-internal/utc-Dali-Material.cpp [moved from automated-tests/src/dali/utc-Dali-Material.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-MeshActor.cpp [moved from automated-tests/src/dali/utc-Dali-MeshActor.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-MeshData.cpp [moved from automated-tests/src/dali/utc-Dali-MeshData.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Mutex.cpp [moved from automated-tests/src/dali/utc-Dali-Mutex.cpp with 100% similarity]
automated-tests/src/dali-internal/utc-Dali-Scripting.cpp [moved from automated-tests/src/dali/utc-Dali-Scripting.cpp with 100% similarity]
automated-tests/src/dali/CMakeLists.txt
automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.h
automated-tests/src/dali/utc-Dali-IntrusivePtr.cpp
automated-tests/src/dali/utc-Dali-ObjectRegistry.cpp
automated-tests/src/dali/utc-Dali-RenderableActor.cpp

index 09109e4..217e8fe 100644 (file)
@@ -6,6 +6,22 @@ SET(RPM_NAME "core-${PKG_NAME}-tests")
 SET(CAPI_LIB "dali-internal")
 
 SET(TC_SOURCES
+        utc-Dali-Atlas.cpp
+        utc-Dali-AnimatableMesh.cpp
+        utc-Dali-Context.cpp
+        utc-Dali-Constrainer.cpp
+        utc-Dali-DistanceField.cpp
+        utc-Dali-DynamicsBodyConfig.cpp
+        utc-Dali-DynamicsShape.cpp
+        utc-Dali-DynamicsWorld.cpp
+        utc-Dali-DynamicsWorldConfig.cpp
+        utc-Dali-Hash.cpp
+        utc-Dali-HitTestAlgorithm.cpp
+        utc-Dali-Material.cpp
+        utc-Dali-MeshActor.cpp
+        utc-Dali-MeshData.cpp
+        utc-Dali-Mutex.cpp
+        utc-Dali-Scripting.cpp
         utc-Dali-Internal-Handles.cpp
         utc-Dali-Internal-ImageFactory.cpp
         utc-Dali-Internal-Mesh.cpp
@@ -17,7 +33,7 @@ SET(TC_SOURCES
 )
 
 LIST(APPEND TC_SOURCES
-        ../dali/dali-test-suite-utils/mesh-builder.cpp
+        mesh-builder.cpp
         ../dali/dali-test-suite-utils/test-harness.cpp
         ../dali/dali-test-suite-utils/dali-test-suite-utils.cpp
         ../dali/dali-test-suite-utils/test-application.cpp
@@ -43,6 +59,7 @@ ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
 
 INCLUDE_DIRECTORIES(
     ../../..
+    .
     ${${CAPI_LIB}_INCLUDE_DIRS}
     ../dali/dali-test-suite-utils
 )
@@ -50,6 +67,7 @@ INCLUDE_DIRECTORIES(
 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
+    -lpthread
 )
 
 INSTALL(PROGRAMS ${EXEC_NAME}
diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-Constraint.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-Constraint.cpp
deleted file mode 100644 (file)
index 5af885d..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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>
-#include <dali/public-api/dali-core.h>
-
-#include <dali-test-suite-utils.h>
-#include <dali/internal/update/animation/scene-graph-constraint-base.h>
-
-using namespace Dali;
-
-using Dali::Internal::SceneGraph::ConstraintBase;
-
-int UtcDaliConstraintNewInput1OffStage(void)
-{
-  /**
-   * Test that the Constraint is correctly added/removed when an object
-   * providing the input property is added/removed from the stage
-   */
-  TestApplication application;
-
-  Actor parent = Actor::New();
-  Stage::GetCurrent().Add( parent );
-
-  Actor actor = Actor::New();
-  parent.Add( actor );
-
-  Actor sibling1 = Actor::New();
-  sibling1.SetPosition( Vector3(1.0f, 2.0f, 3.0f) );
-  parent.Add( sibling1 );
-
-  Vector3 startValue( 0.0f, 0.0f, 0.0f );
-  DALI_TEST_EQUALS( 0u, ConstraintBase::GetCurrentInstanceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 0u, ConstraintBase::GetTotalInstanceCount(),   TEST_LOCATION );
-
-  /**
-   * Test that the Constraint is correctly applied on a clean Node
-   */
-  application.SendNotification();
-  application.Render(0);
-  DALI_TEST_EQUALS( actor.GetProperty<Vector3>( Actor::Property::POSITION ), startValue, TEST_LOCATION );
-
-  // Apply constraint with a parent input property
-
-  Constraint constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
-                                                    Source( sibling1, Actor::Property::POSITION ),
-                                                    EqualToConstraint() );
-
-  actor.ApplyConstraint( constraint );
-  DALI_TEST_EQUALS( actor.GetProperty<Vector3>( Actor::Property::POSITION ), startValue, TEST_LOCATION );
-
-  application.SendNotification();
-  application.Render(0);
-  DALI_TEST_EQUALS( actor.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3(1.0f, 2.0f, 3.0f)/*from sibling1*/, TEST_LOCATION );
-  DALI_TEST_EQUALS( 1u, ConstraintBase::GetCurrentInstanceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 1u, ConstraintBase::GetTotalInstanceCount(),   TEST_LOCATION );
-
-  // Remove sibling1 providing the input property
-
-  parent.Remove( sibling1 );
-  actor.SetPosition( Vector3(2.0f, 2.0f, 2.0f) ); // This should be effective
-
-  application.SendNotification();
-  application.Render(0);
-  DALI_TEST_EQUALS( actor.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3(2.0f, 2.0f, 2.0f)/*from SetPosition*/, TEST_LOCATION );
-  DALI_TEST_EQUALS( 0u/*should have been removed*/, ConstraintBase::GetCurrentInstanceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 1u, ConstraintBase::GetTotalInstanceCount(), TEST_LOCATION );
-
-  // Add sibling1 back again (re-enables constraint)
-
-  parent.Add( sibling1 );
-  actor.SetPosition( Vector3(3.0f, 3.0f, 3.0f) ); // This should NOT be effective
-
-  application.SendNotification();
-  application.Render(0);
-  DALI_TEST_EQUALS( actor.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3(1.0f, 2.0f, 3.0f)/*from sibling1*/, TEST_LOCATION );
-  DALI_TEST_EQUALS( 1u, ConstraintBase::GetCurrentInstanceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 2u/*recreated once*/, ConstraintBase::GetTotalInstanceCount(), TEST_LOCATION );
-
-  END_TEST;
-}
index a726b6d..5bdc6fb 100644 (file)
@@ -9,34 +9,23 @@ SET(TC_SOURCES
         utc-Dali-Actor.cpp
         utc-Dali-AlphaFunction.cpp
         utc-Dali-AngleAxis.cpp
-        utc-Dali-AnimatableMesh.cpp
         utc-Dali-Animation.cpp
         utc-Dali-Any.cpp
-        utc-Dali-Atlas.cpp
         utc-Dali-BaseHandle.cpp
         utc-Dali-BufferImage.cpp
         utc-Dali-CameraActor.cpp
-        utc-Dali-Constrainer.cpp
         utc-Dali-Constraint.cpp
         utc-Dali-ConstraintFunction.cpp
         utc-Dali-Constraints.cpp
         utc-Dali-ConstraintSource.cpp
-        utc-Dali-Context.cpp
         utc-Dali-ConnectionTracker.cpp
         utc-Dali-CustomActor.cpp
         utc-Dali-Degree.cpp
-        utc-Dali-DistanceField.cpp
-        utc-Dali-DynamicsBodyConfig.cpp
-        utc-Dali-DynamicsShape.cpp
-        utc-Dali-DynamicsWorld.cpp
-        utc-Dali-DynamicsWorldConfig.cpp
         utc-Dali-EncodedBufferImage.cpp
         utc-Dali-FrameBufferImage.cpp
         utc-Dali-Gesture.cpp
         utc-Dali-GestureDetector.cpp
         utc-Dali-Handle.cpp
-        utc-Dali-Hash.cpp
-        utc-Dali-HitTestAlgorithm.cpp
         utc-Dali-HoverProcessing.cpp
         utc-Dali-Image.cpp
         utc-Dali-ImageActor.cpp
@@ -46,14 +35,10 @@ SET(TC_SOURCES
         utc-Dali-LocklessBuffer.cpp
         utc-Dali-LongPressGesture.cpp
         utc-Dali-LongPressGestureDetector.cpp
-        utc-Dali-Material.cpp
         utc-Dali-MathUtils.cpp
         utc-Dali-Matrix.cpp
         utc-Dali-Matrix3.cpp
-        utc-Dali-MeshActor.cpp
-        utc-Dali-MeshData.cpp
         utc-Dali-MouseWheelEvent.cpp
-        utc-Dali-Mutex.cpp
         utc-Dali-NativeImage.cpp
         utc-Dali-NinePatchImages.cpp
         utc-Dali-ObjectRegistry.cpp
@@ -77,7 +62,6 @@ SET(TC_SOURCES
         utc-Dali-RenderableActor.cpp
         utc-Dali-ResourceImage.cpp
         utc-Dali-ShaderEffect.cpp
-        utc-Dali-Scripting.cpp
         utc-Dali-SignalTemplatesFunctors.cpp
         utc-Dali-SignalTemplates.cpp
         utc-Dali-Stage.cpp
@@ -94,7 +78,6 @@ SET(TC_SOURCES
 )
 
 LIST(APPEND TC_SOURCES
-        dali-test-suite-utils/mesh-builder.cpp
         dali-test-suite-utils/test-harness.cpp
         dali-test-suite-utils/dali-test-suite-utils.cpp
         dali-test-suite-utils/test-application.cpp
@@ -127,7 +110,6 @@ INCLUDE_DIRECTORIES(
 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
-    -lpthread
 )
 
 INSTALL(PROGRAMS ${EXEC_NAME}
index 21c16c2..926e75a 100644 (file)
@@ -24,7 +24,6 @@
 #include <string>
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/common/set-wrapper.h>
 #include <dali/integration-api/platform-abstraction.h>
 
 #include "test-trace-call-stack.h"
index ccc6336..23c7880 100644 (file)
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali-test-suite-utils.h>
-#include <test-native-image.h>
 
 using namespace Dali;
 
index 15fcfff..1383ee4 100644 (file)
 #include <stdlib.h>
 #include <dali-test-suite-utils.h>
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/actors/mesh-actor.h>
-#include <dali/devel-api/geometry/mesh.h>
 
 using namespace Dali;
 
-#include "mesh-builder.h"
-
 namespace
 {
 
@@ -128,25 +124,6 @@ struct TestLayerCallback
   bool& mSignalVerified;
 };
 
-
-struct TestMeshActorCallback
-{
-  TestMeshActorCallback(bool& signalReceived)
-  : mSignalVerified(signalReceived)
-  {
-  }
-  void operator()(BaseHandle object)
-  {
-    tet_infoline("Verifying TestMeshActorCallback()");
-    MeshActor actor = MeshActor::DownCast(object);
-    if(actor)
-    {
-      mSignalVerified = true;
-    }
-  }
-  bool& mSignalVerified;
-};
-
 struct TestAnimationCallback
 {
   TestAnimationCallback(bool& signalReceived)
@@ -321,37 +298,6 @@ int UtcDaliObjectRegistrySignalLayerCreated(void)
   END_TEST;
 }
 
-
-int UtcDaliObjectRegistrySignalMeshActorCreated(void)
-{
-  TestApplication application;
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
-
-  bool verified = false;
-  TestMeshActorCallback test(verified);
-
-  Dali::RefObject* objectPointer = NULL;
-  TestObjectDestroyedCallback test2(verified, objectPointer);
-
-  registry.ObjectCreatedSignal().Connect(&application, test);
-  registry.ObjectDestroyedSignal().Connect(&application, test2);
-
-  Mesh mesh = ConstructMesh(60);
-
-  {
-    MeshActor actor = MeshActor::New(mesh);
-
-    DALI_TEST_CHECK(actor);
-    DALI_TEST_CHECK( test.mSignalVerified );
-
-    verified = false;
-    objectPointer = actor.GetObjectPtr();
-  }
-  DALI_TEST_CHECK( test.mSignalVerified );
-  END_TEST;
-}
-
-
 int UtcDaliObjectRegistrySignalAnimationCreated(void)
 {
   TestApplication application;
index 23ddf89..25ebaf9 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/actors/mesh-actor.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali-test-suite-utils.h>
 
@@ -303,9 +302,10 @@ int UtcDaliRenderableActorGetCullFace(void)
 
   DALI_TEST_CHECK( CullNone == imageActor.GetCullFace() );
 
-  MeshActor meshActor = MeshActor::New();
+  imageActor.SetCullFace( CullBack );
+
+  DALI_TEST_CHECK( CullBack == imageActor.GetCullFace() );
 
-  DALI_TEST_CHECK( CullBack == meshActor.GetCullFace() );
   END_TEST;
 }