add testcase

Signed-off-by: 50034454 <xiaxiang5@huawei.com>
Change-Id: Ic8303b7031c2a08740c9168c5ce879db8c52ffdb
This commit is contained in:
50034454 2023-08-22 15:20:20 +08:00
parent a2e21c3dd8
commit 3fc98393d8
2 changed files with 21 additions and 23 deletions

View File

@ -577,31 +577,31 @@ HWTEST_F(RSScreenManagerTest, RemoveVirtualScreen_002, TestSize.Level1)
auto screenManager = CreateOrGetScreenManager();
ASSERT_NE(nullptr, screenManager);
std::string name_001 = "virtualScreen01";
uint32_t width_001 = 480;
uint32_t height_001 = 320;
std::string name001 = "virtualScreen01";
uint32_t width001 = 480;
uint32_t height001 = 320;
auto csurface_001 = IConsumerSurface::Create();
ASSERT_NE(csurface_001, nullptr);
auto producer_001 = csurface_001->GetProducer();
auto psurface_001 = Surface::CreateSurfaceAsProducer(producer_001);
ASSERT_NE(psurface_001, nullptr);
auto csurface001 = IConsumerSurface::Create();
ASSERT_NE(csurface001, nullptr);
auto producer001 = csurface001->GetProducer();
auto psurface001 = Surface::CreateSurfaceAsProducer(producer001);
ASSERT_NE(psurface001, nullptr);
std::string name_002 = "virtualScreen02";
uint32_t width_002 = 480;
uint32_t height_002 = 320;
auto id001 = screenManager->CreateVirtualScreen(name001, width001, height001, psurface001);
ASSERT_NE(INVALID_SCREEN_ID, id001);
auto csurface_002 = IConsumerSurface::Create();
ASSERT_NE(csurface_002, nullptr);
auto producer_002 = csurface_002->GetProducer();
auto psurface_002 = Surface::CreateSurfaceAsProducer(producer_002);
ASSERT_NE(psurface_002, nullptr);
std::string name002 = "virtualScreen02";
uint32_t width002 = 480;
uint32_t height002 = 320;
auto id_001 = screenManager->CreateVirtualScreen(name_001, width_001, height_001, psurface_001);
ASSERT_NE(INVALID_SCREEN_ID, id_001);
auto csurface002 = IConsumerSurface::Create();
ASSERT_NE(csurface002, nullptr);
auto producer002 = csurface002->GetProducer();
auto psurface002 = Surface::CreateSurfaceAsProducer(producer002);
ASSERT_NE(psurface002, nullptr);
auto id_002 = screenManager->CreateVirtualScreen(name_002, width_002, height_002, psurface_002);
ASSERT_NE(INVALID_SCREEN_ID, id_002);
auto id002 = screenManager->CreateVirtualScreen(name002, width002, height002, psurface002);
ASSERT_NE(INVALID_SCREEN_ID, id002);
ScreenId screenId = INVALID_SCREEN_ID;
screenManager->RemoveVirtualScreen(screenId);

View File

@ -44,11 +44,9 @@ ohos_static_library("buffer_handle_test_common") {
public_configs = [ ":buffer_handle_test_config" ]
public_deps = [
"//foundation/graphic/graphic_2d/utils/buffer_handle:buffer_handle",
"../../../utils/buffer_handle:buffer_handle",
"//third_party/googletest:gtest_main",
]
public_configs = [ ":buffer_handle_public_config" ]
external_deps = [
"c_utils:utils",