setenv("TBM_DISPLAY_SERVER", "1", 1);
}
-int UtSurface::width = 720;
-int UtSurface::height = 1024;
-tbm_format UtSurface::format;
-uint32_t UtSurface::num_formats;
-tbm_format *UtSurface::formats;
+int SurfaceTest::width = 720;
+int SurfaceTest::height = 1024;
+tbm_format SurfaceTest::format;
+uint32_t SurfaceTest::num_formats;
+tbm_format *SurfaceTest::formats;
-void UtSurface::SetUpTestCase()
+void SurfaceTest::SetUpTestCase()
{
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
format = formats[0];
}
-void UtSurface::TearDownTestCase()
+void SurfaceTest::TearDownTestCase()
{
if (formats)
free(formats);
}
-void UtSurface::SetUp()
+void SurfaceTest::SetUp()
{
surface = tbm_surface_create(width, height, format);
ASSERT_TRUE(surface != NULL);
}
-void UtSurface::TearDown()
+void SurfaceTest::TearDown()
{
if (surface)
tbm_surface_destroy(surface);
}
}
-TEST_F(UtSurface, SurfaceGetFormatFailInvalidInput)
+TEST_F(SurfaceTest, SurfaceGetFormatFailInvalidInput)
{
tbm_surface_h invalid_surface = (tbm_surface_h)1;
tbm_format fmt = tbm_surface_get_format(invalid_surface);
ASSERT_EQ(0, fmt);
}
-TEST_F(UtSurface, SurfaceGetFormatFailNull)
+TEST_F(SurfaceTest, SurfaceGetFormatFailNull)
{
tbm_format fmt = tbm_surface_get_format(NULL);
ASSERT_EQ(0, fmt);
}
-TEST_F(UtSurface, SurfaceGetFormatSuccess)
+TEST_F(SurfaceTest, SurfaceGetFormatSuccess)
{
tbm_format fmt = tbm_surface_get_format(surface);
ASSERT_EQ(this->format, fmt);
}
-TEST_F(UtSurface, SurfaceGetWidthFailInvalidInput)
+TEST_F(SurfaceTest, SurfaceGetWidthFailInvalidInput)
{
tbm_surface_h invalid_surface = (tbm_surface_h)1;
int width = tbm_surface_get_width(invalid_surface);
ASSERT_EQ(0, width);
}
-TEST_F(UtSurface, SurfaceGetWidthFailNull)
+TEST_F(SurfaceTest, SurfaceGetWidthFailNull)
{
int width = tbm_surface_get_width(NULL);
ASSERT_EQ(TBM_SURFACE_ERROR_INVALID_PARAMETER, width);
}
-TEST_F(UtSurface, SurfaceGetWidthSuccess)
+TEST_F(SurfaceTest, SurfaceGetWidthSuccess)
{
int width = tbm_surface_get_width(surface);
ASSERT_EQ(this->width, width);
}
-TEST_F(UtSurface, SurfaceGetHeightFailInvalidInput)
+TEST_F(SurfaceTest, SurfaceGetHeightFailInvalidInput)
{
tbm_surface_h invalid_surface = (tbm_surface_h)1;
int height = tbm_surface_get_height(invalid_surface);
ASSERT_EQ(0, height);
}
-TEST_F(UtSurface, SurfaceGetHeightFailNull)
+TEST_F(SurfaceTest, SurfaceGetHeightFailNull)
{
int height = tbm_surface_get_height(NULL);
ASSERT_EQ(TBM_SURFACE_ERROR_INVALID_PARAMETER, height);
}
-TEST_F(UtSurface, SurfaceGetHeightSuccess)
+TEST_F(SurfaceTest, SurfaceGetHeightSuccess)
{
int height = tbm_surface_get_height(surface);
ASSERT_EQ(this->height, height);
}
-TEST_F(UtSurface, SurfaceGetInfoInvalidInput)
+TEST_F(SurfaceTest, SurfaceGetInfoInvalidInput)
{
tbm_surface_h invalid_surface = (tbm_surface_h)1;
tbm_surface_info_s info;
ASSERT_EQ(TBM_SURFACE_ERROR_INVALID_OPERATION, result);
}
-TEST_F(UtSurface, SurfaceGetInfoFailNull)
+TEST_F(SurfaceTest, SurfaceGetInfoFailNull)
{
tbm_surface_info_s info;
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
ASSERT_EQ(TBM_SURFACE_ERROR_INVALID_PARAMETER, result);
}
-TEST_F(UtSurface, SurfaceGetInfoSuccess)
+TEST_F(SurfaceTest, SurfaceGetInfoSuccess)
{
tbm_surface_info_s info;
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
ASSERT_GT(info.size, 0);
}
-TEST_F(UtSurface, SurfaceMapFailInvalidInput)
+TEST_F(SurfaceTest, SurfaceMapFailInvalidInput)
{
tbm_surface_info_s info;
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
ASSERT_EQ(TBM_SURFACE_ERROR_INVALID_OPERATION, result);
}
-TEST_F(UtSurface, SurfaceMapFailNull)
+TEST_F(SurfaceTest, SurfaceMapFailNull)
{
tbm_surface_info_s info;
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
ASSERT_EQ(TBM_SURFACE_ERROR_INVALID_PARAMETER, result);
}
-TEST_F(UtSurface, SurfaceMapSuccess)
+TEST_F(SurfaceTest, SurfaceMapSuccess)
{
tbm_surface_info_s info;
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
ASSERT_EQ(TBM_SURFACE_ERROR_NONE, result);
}
-TEST_F(UtSurface, SurfaceUnmapFailInvalidInput)
+TEST_F(SurfaceTest, SurfaceUnmapFailInvalidInput)
{
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;
tbm_surface_h invalid_surface = (tbm_surface_h)1;
ASSERT_EQ(TBM_SURFACE_ERROR_NONE, result);
}
-TEST_F(UtSurface, SurfaceUnmapFailNull)
+TEST_F(SurfaceTest, SurfaceUnmapFailNull)
{
tbm_surface_error_e result = TBM_SURFACE_ERROR_NONE;