Updates for const->constexpr
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / dali-test-suite-utils.cpp
index d76ce60..87750e2 100644 (file)
@@ -40,6 +40,8 @@ void tet_result(int32_t value)
 #define END_TEST \
   return ((test_return_value>0)?1:0)
 
+extern "C"
+{
 
 void tet_infoline(const char* str)
 {
@@ -53,6 +55,8 @@ void tet_printf(const char *format, ...)
   vfprintf(stderr, format, arg);
   va_end(arg);
 }
+}
+
 
 bool operator==(TimePeriod a, TimePeriod b)
 {
@@ -328,21 +332,6 @@ void ConstraintAppliedCheck::CheckSignalNotReceived()
   }
 }
 
-void PrepareResourceImage( TestApplication& application, uint32_t imageWidth, uint32_t imageHeight, Pixel::Format pixelFormat )
-{
-  TestPlatformAbstraction& platform = application.GetPlatform();
-  platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
-
-  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
-  Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
-  uint32_t bytesPerPixel = GetBytesPerPixel(  pixelFormat );
-  uint32_t initialColor = 0xFF;
-  memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
-
-  Integration::ResourcePointer resourcePtr(bitmap);
-  platform.SetSynchronouslyLoadedResource( resourcePtr );
-}
-
 namespace Test
 {
 
@@ -371,17 +360,16 @@ struct ObjectDestructionFunctor
   bool& refObjectDestroyedBoolean;
 };
 
-ObjectDestructionTracker::ObjectDestructionTracker()
-  :mRefObjectDestroyed( false)
+ObjectDestructionTracker::ObjectDestructionTracker( ObjectRegistry objectRegistry )
+: mObjectRegistry( objectRegistry ),
+  mRefObjectDestroyed( false)
 {
 }
 
 void ObjectDestructionTracker::Start( Actor actor )
 {
   ObjectDestructionFunctor destructionFunctor( actor.GetObjectPtr(), mRefObjectDestroyed );
-
-  ObjectRegistry objectRegistry = Stage::GetCurrent().GetObjectRegistry();
-  objectRegistry.ObjectDestroyedSignal().Connect( this, destructionFunctor );
+  mObjectRegistry.ObjectDestroyedSignal().Connect( this, destructionFunctor );
 }
 
 bool ObjectDestructionTracker::IsDestroyed()