Put lockless-buffer in the correct folder & ensure local headers are picked before... 18/39718/3
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 21 May 2015 11:10:47 +0000 (12:10 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 21 May 2015 14:06:34 +0000 (15:06 +0100)
Also 100% constraint coverage

Change-Id: I7262d610a7bf7fcc4106115bc0e855ad1baa813f

automated-tests/src/dali-internal/CMakeLists.txt
automated-tests/src/dali/CMakeLists.txt
automated-tests/src/dali/utc-Dali-Constraint.cpp
dali/integration-api/file.list
dali/integration-api/lockless-buffer.cpp [moved from dali/integration-api/common/lockless-buffer.cpp with 100% similarity]
dali/integration-api/lockless-buffer.h [moved from dali/integration-api/common/lockless-buffer.h with 100% similarity]

index a52b0a1..09109e4 100644 (file)
@@ -42,9 +42,9 @@ FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
 
 INCLUDE_DIRECTORIES(
+    ../../..
     ${${CAPI_LIB}_INCLUDE_DIRS}
     ../dali/dali-test-suite-utils
-    ../../..
 )
 
 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
index 111e874..41aadab 100644 (file)
@@ -117,6 +117,7 @@ FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
 
 INCLUDE_DIRECTORIES(
+    ../../../
     ${${CAPI_LIB}_INCLUDE_DIRS}
     dali-test-suite-utils
 )
index e1b8ac0..3f4d5dc 100644 (file)
@@ -1153,3 +1153,71 @@ int UtcDaliConstraintChaining(void)
   END_TEST;
 }
 ///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+namespace TestPropertyTypes
+{
+template< typename T >
+void Execute( T value )
+{
+  TestApplication application;
+  bool functorCalled = false;
+
+  Actor actor = Actor::New();
+  Property::Index index = actor.RegisterProperty( "TEMP_PROPERTY_NAME", value );
+
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( functorCalled, false, TEST_LOCATION );
+
+  // Add a constraint
+  Constraint constraint = Constraint::New< T >( actor, index, BasicCalledFunctor< T >( functorCalled ) );
+  DALI_TEST_CHECK( constraint );
+  constraint.Apply();
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( functorCalled, true, TEST_LOCATION );
+}
+} // namespace UtcDaliConstraintNewFunctor
+
+int UtcDaliConstraintTestPropertyTypesP(void)
+{
+  // Ensure we can use a constraint functor with all supported property types
+
+  TestPropertyTypes::Execute< bool >( false );
+  TestPropertyTypes::Execute< int >( 0 );
+  TestPropertyTypes::Execute< float >( 0.0f );
+  TestPropertyTypes::Execute< Vector2 >( Vector2::ZERO );
+  TestPropertyTypes::Execute< Vector3 >( Vector3::ZERO );
+  TestPropertyTypes::Execute< Vector4 >( Vector4::ZERO );
+  TestPropertyTypes::Execute< Quaternion >( Quaternion::IDENTITY );
+  TestPropertyTypes::Execute< Matrix >( Matrix::IDENTITY );
+  TestPropertyTypes::Execute< Matrix3 >( Matrix3::IDENTITY );
+
+  END_TEST;
+}
+
+int UtcDaliConstraintTestPropertyTypesN(void)
+{
+  // unsigned int not supported so we should assert
+
+  try
+  {
+    TestPropertyTypes::Execute< unsigned int >( 0u );
+    DALI_TEST_CHECK( false ); // Should not come here
+  }
+  catch( ... )
+  {
+    DALI_TEST_CHECK( true );
+  }
+
+
+  END_TEST;
+}
+///////////////////////////////////////////////////////////////////////////////
+
index d6b7779..374099f 100644 (file)
@@ -8,7 +8,7 @@ platform_abstraction_src_files = \
    $(platform_abstraction_src_dir)/profiling.cpp \
    $(platform_abstraction_src_dir)/input-options.cpp \
    $(platform_abstraction_src_dir)/system-overlay.cpp \
-   $(platform_abstraction_src_dir)/common/lockless-buffer.cpp \
+   $(platform_abstraction_src_dir)/lockless-buffer.cpp \
    $(platform_abstraction_src_dir)/events/event.cpp \
    $(platform_abstraction_src_dir)/events/gesture-event.cpp \
    $(platform_abstraction_src_dir)/events/hover-event-integ.cpp \
@@ -43,7 +43,7 @@ platform_abstraction_header_files = \
    $(platform_abstraction_src_dir)/platform-abstraction.h \
    $(platform_abstraction_src_dir)/shader-data.h \
    $(platform_abstraction_src_dir)/system-overlay.h \
-   $(platform_abstraction_src_dir)/common/lockless-buffer.h
+   $(platform_abstraction_src_dir)/lockless-buffer.h
 
 platform_abstraction_dynamics_header_files = \
    $(platform_abstraction_src_dir)/dynamics/dynamics-body-intf.h \