X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Fdali-test-suite-utils.cpp;h=87750e239af86b5be840dcf13c0cb1fccb161cd5;hp=d76ce606b92c142ba47c22bdb55bf4f208b238fc;hb=610495b8647d1a25c98bf0773ccc0dd6d1996263;hpb=d402b997c5874a73bfec576eff290af235c1c03d diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp index d76ce60..87750e2 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp @@ -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()