utest: add SurfaceQueryFormatsTest testcase 99/170599/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 20 Feb 2018 11:19:37 +0000 (20:19 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 20 Feb 2018 11:19:37 +0000 (20:19 +0900)
Change-Id: I193b7a89f37a0897268ffe43220d3b37c7e84015

utests/ut.cpp
utests/ut.h
utests/ut_tbm_surface.cpp

index ad64b50..0707975 100644 (file)
@@ -124,6 +124,11 @@ void SurfaceTest::TearDown()
                tbm_surface_destroy(surface);
 }
 
+void SurfaceQueryFormatsTest::SetUp()
+{}
+
+void SurfaceQueryFormatsTest::TearDown()
+{}
 
 int SurfaceQueueTest::width = 720;
 int SurfaceQueueTest::height = 1024;
index af5f644..e8d7bb7 100644 (file)
@@ -82,6 +82,17 @@ public:
        tbm_surface_h surface;
 };
 
+/* The test fixture class, which deinitializes bufmgr after the test is finished.
+To init bufmgr you need to call UtBufmgrInit() func. Do not call tbm_bufmgr_init()
+directly because deinitialization won't be called if test is failed */
+class SurfaceQueryFormatsTest : public ::testing::Test
+{
+protected:
+       void SetUp();
+       void TearDown();
+public:
+};
+
 typedef SurfaceTest SurfaceInternalTest;
 
 #define QUEUE_SIZE 3
index 51141aa..f7aa66a 100644 (file)
@@ -5,7 +5,7 @@
 #include <tbm_surface.h>
 #include "ut.h"
 
-TEST_F(UtInit, SurfaceQueryFormatsFailNull)
+TEST_F(SurfaceQueryFormatsTest, SurfaceQueryFormatsFailNull)
 {
        uint32_t num = 0;
        tbm_format *formats = NULL;
@@ -20,7 +20,7 @@ TEST_F(UtInit, SurfaceQueryFormatsFailNull)
        ASSERT_NE(TBM_SURFACE_ERROR_NONE, result);
 }
 
-TEST_F(UtInit, SurfaceQueryFormatSuccess)
+TEST_F(SurfaceQueryFormatsTest, SurfaceQueryFormatSuccess)
 {
        uint32_t num = 0;
        tbm_format *formats = NULL;