[UTC][dali-core][ACR-1351][Add FrameBuffer::New parameter] 09/202609/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 1 Apr 2019 11:40:40 +0000 (20:40 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 1 Apr 2019 11:41:42 +0000 (20:41 +0900)
Change-Id: I36afe848e2f032a4cba84c1dc4f8a67d93691acc
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
src/utc/dali-core/frame-buffer/utc-frame-buffer.cpp
src/utc/dali-core/tct-dali-core-core_mobile.h
src/utc/dali-core/tct-dali-core-core_tizeniot.h
src/utc/dali-core/tct-dali-core-core_wearable.h

index 041ffb6165e139d0aaefce006b9b20bbbdd59858..5e621b4b73f7017372944b7d45211561d92eef95 100755 (executable)
@@ -22,6 +22,11 @@ void FrameBufferDownCastN();
 void FrameBufferAssignmentOperator();
 void FrameBufferAttachAndGetColorTexture01();
 void FrameBufferAttachAndGetColorTexture02();
+void FrameBufferNewWithColor01();
+void FrameBufferNewWithColor02();
+void FrameBufferNewWithColor03();
+void FrameBufferNewWithColor04();
+void FrameBufferNewWithColor05();
 
 
 namespace
@@ -34,6 +39,11 @@ namespace
     FRAMEBUFFER_ASSIGNMENT_OPERATOR,
     FRAMEBUFFER_ATTACH_AND_GET_COLOR_TEXTURE_01,
     FRAMEBUFFER_ATTACH_AND_GET_COLOR_TEXTURE_02,
+    FRAMEBUFFER_NEW_WITH_COLOR_01,
+    FRAMEBUFFER_NEW_WITH_COLOR_02,
+    FRAMEBUFFER_NEW_WITH_COLOR_03,
+    FRAMEBUFFER_NEW_WITH_COLOR_04,
+    FRAMEBUFFER_NEW_WITH_COLOR_05,
   };
 
   struct FrameBuffer_TestApp : public ConnectionTracker
@@ -80,6 +90,21 @@ namespace
         case FRAMEBUFFER_ATTACH_AND_GET_COLOR_TEXTURE_02:
         FrameBufferAttachAndGetColorTexture02();
         break;
+        case FRAMEBUFFER_NEW_WITH_COLOR_01:
+        FrameBufferNewWithColor01();
+        break;
+        case FRAMEBUFFER_NEW_WITH_COLOR_02:
+        FrameBufferNewWithColor02();
+        break;
+        case FRAMEBUFFER_NEW_WITH_COLOR_03:
+        FrameBufferNewWithColor03();
+        break;
+        case FRAMEBUFFER_NEW_WITH_COLOR_04:
+        FrameBufferNewWithColor04();
+        break;
+        case FRAMEBUFFER_NEW_WITH_COLOR_05:
+        FrameBufferNewWithColor05();
+        break;
       }
     }
 
@@ -163,6 +188,62 @@ void FrameBufferAttachAndGetColorTexture02()
   DaliLog::PrintPass();
 }
 
+void FrameBufferNewWithColor01()
+{
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height );
+
+  DALI_CHECK_FAIL( !frameBuffer, "FrameBuffer::New failed" );
+
+  DaliLog::PrintPass();
+}
+
+void FrameBufferNewWithColor02()
+{
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::COLOR );
+
+  DALI_CHECK_FAIL( !frameBuffer, "FrameBuffer::New failed" );
+
+  DaliLog::PrintPass();
+}
+
+void FrameBufferNewWithColor03()
+{
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::COLOR_DEPTH );
+
+  DALI_CHECK_FAIL( !frameBuffer, "FrameBuffer::New failed" );
+
+  DaliLog::PrintPass();
+}
+
+void FrameBufferNewWithColor04()
+{
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::COLOR_STENCIL );
+
+  DALI_CHECK_FAIL( !frameBuffer, "FrameBuffer::New failed" );
+
+  DaliLog::PrintPass();
+}
+
+void FrameBufferNewWithColor05()
+{
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::COLOR_DEPTH_STENCIL );
+
+  DALI_CHECK_FAIL( !frameBuffer, "FrameBuffer::New failed" );
+
+  DaliLog::PrintPass();
+}
+
+
 /**
  * End of TC Logic Implementation Area.
  **/
@@ -196,7 +277,7 @@ int UtcFrameBufferDownCastP(void)
 }
 
 /**
- * @testcase          UtcFrameBufferDownCastN
+ * @testcase         UtcFrameBufferDownCastN
  * @since_tizen      3.0
  * @description      Check DownCast
  */
@@ -210,7 +291,7 @@ int UtcFrameBufferDownCastN(void)
 }
 
 /**
- * @testcase          UtcFrameBufferAssignmentOperator
+ * @testcase         UtcFrameBufferAssignmentOperator
  * @since_tizen      3.0
  * @description      Check assignment operator
  */
@@ -224,7 +305,7 @@ int UtcFrameBufferAssignmentOperator(void)
 }
 
 /**
- * @testcase          UtcFrameBufferAttachAndGetColorTexture01
+ * @testcase         UtcFrameBufferAttachAndGetColorTexture01
  * @since_tizen      3.0
  * @description      Attach a texture and ensure the same one can be retrieved
  */
@@ -238,7 +319,7 @@ int UtcFrameBufferAttachAndGetColorTexture01(void)
 }
 
 /**
- * @testcase          UtcFrameBufferAttachAndGetColorTexture02
+ * @testcase         UtcFrameBufferAttachAndGetColorTexture02
  * @since_tizen      3.0
  * @description      Attach a texture and ensure the same one can be retrieved
  */
@@ -250,3 +331,73 @@ int UtcFrameBufferAttachAndGetColorTexture02(void)
   application.MainLoop();
   return test_return_value;
 }
+
+/**
+ * @testcase         UtcFrameBufferNewWithColor01
+ * @since_tizen      5.5
+ * @description      Check New method with FrameBuffer::Attachment parameter
+ */
+int UtcFrameBufferNewWithColor01(void)
+{
+  DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+  Application application = Application::New( &gArgc, &gArgv );
+  FrameBuffer_TestApp testApp( application, FRAMEBUFFER_NEW_WITH_COLOR_01 );
+  application.MainLoop();
+  return test_return_value;
+}
+
+/**
+ * @testcase         UtcFrameBufferNewWithColor02
+ * @since_tizen      5.5
+ * @description      Check New method with FrameBuffer::Attachment parameter
+ */
+int UtcFrameBufferNewWithColor02(void)
+{
+  DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+  Application application = Application::New( &gArgc, &gArgv );
+  FrameBuffer_TestApp testApp( application, FRAMEBUFFER_NEW_WITH_COLOR_02 );
+  application.MainLoop();
+  return test_return_value;
+}
+
+/**
+ * @testcase         UtcFrameBufferNewWithColor03
+ * @since_tizen      5.5
+ * @description      Check New method with FrameBuffer::Attachment parameter
+ */
+int UtcFrameBufferNewWithColor03(void)
+{
+  DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+  Application application = Application::New( &gArgc, &gArgv );
+  FrameBuffer_TestApp testApp( application, FRAMEBUFFER_NEW_WITH_COLOR_03 );
+  application.MainLoop();
+  return test_return_value;
+}
+
+/**
+ * @testcase         UtcFrameBufferNewWithColor04
+ * @since_tizen      5.5
+ * @description      Check New method with FrameBuffer::Attachment parameter
+ */
+int UtcFrameBufferNewWithColor04(void)
+{
+  DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+  Application application = Application::New( &gArgc, &gArgv );
+  FrameBuffer_TestApp testApp( application, FRAMEBUFFER_NEW_WITH_COLOR_04 );
+  application.MainLoop();
+  return test_return_value;
+}
+
+/**
+ * @testcase         UtcFrameBufferNewWithColor02
+ * @since_tizen      5.5
+ * @description      Check New method with FrameBuffer::Attachment parameter
+ */
+int UtcFrameBufferNewWithColor05(void)
+{
+  DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+  Application application = Application::New( &gArgc, &gArgv );
+  FrameBuffer_TestApp testApp( application, FRAMEBUFFER_NEW_WITH_COLOR_05 );
+  application.MainLoop();
+  return test_return_value;
+}
index 33ed167e91ef4ec2f74e3e0b9f19be49af3fcfdb..74f42722905d13e7ca5a6221a89ef9edd168ad88 100755 (executable)
@@ -1277,6 +1277,11 @@ extern int UtcFrameBufferDownCastN(void);
 extern int UtcFrameBufferAssignmentOperator(void);
 extern int UtcFrameBufferAttachAndGetColorTexture01(void);
 extern int UtcFrameBufferAttachAndGetColorTexture02(void);
+extern int UtcFrameBufferNewWithColor01(void);
+extern int UtcFrameBufferNewWithColor02(void);
+extern int UtcFrameBufferNewWithColor03(void);
+extern int UtcFrameBufferNewWithColor04(void);
+extern int UtcFrameBufferNewWithColor05(void);
 extern int UtcGeometryConstructorAndNew(void);
 extern int UtcGeometryDownCastP(void);
 extern int UtcGeometryDownCastN(void);
@@ -2452,6 +2457,11 @@ testcase tc_array[] = {
        {"UtcFrameBufferAssignmentOperator",UtcFrameBufferAssignmentOperator,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcFrameBufferAttachAndGetColorTexture01",UtcFrameBufferAttachAndGetColorTexture01,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcFrameBufferAttachAndGetColorTexture02",UtcFrameBufferAttachAndGetColorTexture02,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor01",UtcFrameBufferNewWithColor01,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor02",UtcFrameBufferNewWithColor02,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor03",UtcFrameBufferNewWithColor03,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor04",UtcFrameBufferNewWithColor04,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor05",UtcFrameBufferNewWithColor05,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcGeometryConstructorAndNew",UtcGeometryConstructorAndNew,utc_geometry_startup,utc_geometry_cleanup},
        {"UtcGeometryDownCastP",UtcGeometryDownCastP,utc_geometry_startup,utc_geometry_cleanup},
        {"UtcGeometryDownCastN",UtcGeometryDownCastN,utc_geometry_startup,utc_geometry_cleanup},
index 33ed167e91ef4ec2f74e3e0b9f19be49af3fcfdb..74f42722905d13e7ca5a6221a89ef9edd168ad88 100755 (executable)
@@ -1277,6 +1277,11 @@ extern int UtcFrameBufferDownCastN(void);
 extern int UtcFrameBufferAssignmentOperator(void);
 extern int UtcFrameBufferAttachAndGetColorTexture01(void);
 extern int UtcFrameBufferAttachAndGetColorTexture02(void);
+extern int UtcFrameBufferNewWithColor01(void);
+extern int UtcFrameBufferNewWithColor02(void);
+extern int UtcFrameBufferNewWithColor03(void);
+extern int UtcFrameBufferNewWithColor04(void);
+extern int UtcFrameBufferNewWithColor05(void);
 extern int UtcGeometryConstructorAndNew(void);
 extern int UtcGeometryDownCastP(void);
 extern int UtcGeometryDownCastN(void);
@@ -2452,6 +2457,11 @@ testcase tc_array[] = {
        {"UtcFrameBufferAssignmentOperator",UtcFrameBufferAssignmentOperator,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcFrameBufferAttachAndGetColorTexture01",UtcFrameBufferAttachAndGetColorTexture01,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcFrameBufferAttachAndGetColorTexture02",UtcFrameBufferAttachAndGetColorTexture02,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor01",UtcFrameBufferNewWithColor01,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor02",UtcFrameBufferNewWithColor02,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor03",UtcFrameBufferNewWithColor03,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor04",UtcFrameBufferNewWithColor04,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor05",UtcFrameBufferNewWithColor05,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcGeometryConstructorAndNew",UtcGeometryConstructorAndNew,utc_geometry_startup,utc_geometry_cleanup},
        {"UtcGeometryDownCastP",UtcGeometryDownCastP,utc_geometry_startup,utc_geometry_cleanup},
        {"UtcGeometryDownCastN",UtcGeometryDownCastN,utc_geometry_startup,utc_geometry_cleanup},
index 894968dc581c8a38e24436635ed217f91b033741..2fd649114cb27347d8afabdf0c7a031199dd8162 100755 (executable)
@@ -1277,6 +1277,11 @@ extern int UtcFrameBufferDownCastN(void);
 extern int UtcFrameBufferAssignmentOperator(void);
 extern int UtcFrameBufferAttachAndGetColorTexture01(void);
 extern int UtcFrameBufferAttachAndGetColorTexture02(void);
+extern int UtcFrameBufferNewWithColor01(void);
+extern int UtcFrameBufferNewWithColor02(void);
+extern int UtcFrameBufferNewWithColor03(void);
+extern int UtcFrameBufferNewWithColor04(void);
+extern int UtcFrameBufferNewWithColor05(void);
 extern int UtcGeometryConstructorAndNew(void);
 extern int UtcGeometryDownCastP(void);
 extern int UtcGeometryDownCastN(void);
@@ -2451,6 +2456,11 @@ testcase tc_array[] = {
        {"UtcFrameBufferAssignmentOperator",UtcFrameBufferAssignmentOperator,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcFrameBufferAttachAndGetColorTexture01",UtcFrameBufferAttachAndGetColorTexture01,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcFrameBufferAttachAndGetColorTexture02",UtcFrameBufferAttachAndGetColorTexture02,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor01",UtcFrameBufferNewWithColor01,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor02",UtcFrameBufferNewWithColor02,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor03",UtcFrameBufferNewWithColor03,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor04",UtcFrameBufferNewWithColor04,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
+       {"UtcFrameBufferNewWithColor05",UtcFrameBufferNewWithColor05,utc_frame_buffer_startup,utc_frame_buffer_cleanup},
        {"UtcGeometryConstructorAndNew",UtcGeometryConstructorAndNew,utc_geometry_startup,utc_geometry_cleanup},
        {"UtcGeometryDownCastP",UtcGeometryDownCastP,utc_geometry_startup,utc_geometry_cleanup},
        {"UtcGeometryDownCastN",UtcGeometryDownCastN,utc_geometry_startup,utc_geometry_cleanup},