Revert "[3.0] (FrameBufferImage) Store ReleasePolicy to satisfy Tizen API policy"
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-FrameBufferImage.cpp
index 31c4939..b79619a 100644 (file)
@@ -37,9 +37,6 @@ void utc_dali_framebuffer_cleanup(void)
   test_return_value = TET_PASS;
 }
 
-static const float ROTATION_EPSILON = 0.0001f;
-
-
 int UtcDaliFrameBufferImageNew01(void)
 {
   TestApplication application;
@@ -113,7 +110,9 @@ int UtcDaliFrameBufferImageNew03(void)
   image = FrameBufferImage::New(*(nativeImage.Get()), Image::UNUSED);
 
   DALI_TEST_CHECK( image );
-  DALI_TEST_EQUALS( image.GetReleasePolicy(), Image::UNUSED, TEST_LOCATION );
+
+  //ReleasePolicy is always never for framebuffer images
+  DALI_TEST_EQUALS( image.GetReleasePolicy(), Image::NEVER, TEST_LOCATION );
 
   // initialise handle with NEVER release policy
   image.Reset();
@@ -122,6 +121,8 @@ int UtcDaliFrameBufferImageNew03(void)
   image = FrameBufferImage::New(*(nativeImage.Get()), Image::NEVER);
 
   DALI_TEST_CHECK( image );
+
+  //ReleasePolicy is always never for framebuffer images
   DALI_TEST_EQUALS( image.GetReleasePolicy(), Image::NEVER, TEST_LOCATION );
 
   END_TEST;
@@ -146,9 +147,9 @@ int UtcDaliFrameBufferImageAttachments01(void)
   application.Render();
   application.SendNotification();
 
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), false, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), false, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
 
   END_TEST;
 }
@@ -172,9 +173,9 @@ int UtcDaliFrameBufferImageAttachments02(void)
   application.Render();
   application.SendNotification();
 
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), false, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
 
   END_TEST;
 }
@@ -198,9 +199,9 @@ int UtcDaliFrameBufferImageAttachments03(void)
   application.Render();
   application.SendNotification();
 
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), false, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
 
   END_TEST;
 }
@@ -224,9 +225,9 @@ int UtcDaliFrameBufferImageAttachments04(void)
   application.Render();
   application.SendNotification();
 
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
 
   END_TEST;
 }