#define END_TEST \
return ((test_return_value>0)?1:0)
+extern "C"
+{
void tet_infoline(const char* str)
{
vfprintf(stderr, format, arg);
va_end(arg);
}
+}
+
bool operator==(TimePeriod a, TimePeriod b)
{
}
}
-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
{
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()