2 #include <libds-tizen/allocator/tbm.h>
3 #include <drm_fourcc.h>
5 class AllocatorTbmTest : public ::testing::Test
8 void SetUp(void) override;
9 void TearDown(void) override;
13 AllocatorTbmTest::SetUp(void)
18 AllocatorTbmTest::TearDown(void)
22 TEST_F(AllocatorTbmTest, Create_P)
24 struct ds_allocator *allocator;
26 allocator = ds_tbm_allocator_create();
27 EXPECT_TRUE(allocator != NULL);
29 ds_allocator_destroy(allocator);
32 TEST_F(AllocatorTbmTest, GetSurface_P)
34 struct ds_allocator *allocator;
35 struct ds_buffer *buffer;
38 allocator = ds_tbm_allocator_create();
39 EXPECT_TRUE(allocator != NULL);
42 ds_allocator_create_buffer(allocator, 100, 100, DRM_FORMAT_XRGB8888);
43 EXPECT_TRUE(buffer != NULL);
45 tbm_buffer = ds_tbm_buffer_get_surface(buffer);
46 EXPECT_TRUE(tbm_buffer != NULL);
48 ds_allocator_destroy(allocator);