diff --git a/services/data_process/test/unittest/common/pipeline_node/fps_controller_process_test.cpp b/services/data_process/test/unittest/common/pipeline_node/fps_controller_process_test.cpp index a1ca23a40ad84d94db2ca51d28e8d693d13bf265..431dc97cf2b45cac9589dca3a51eef9b21599621 100644 --- a/services/data_process/test/unittest/common/pipeline_node/fps_controller_process_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/fps_controller_process_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -153,9 +153,21 @@ HWTEST_F(FpsControllerProcessTest, fps_controller_process_test_004, TestSize.Lev EXPECT_EQ(false, testFpsControllerProcess_ == nullptr); std::vector> inputBuffers; + int32_t rc = testFpsControllerProcess_->ProcessData(inputBuffers); + EXPECT_EQ(rc, DCAMERA_BAD_TYPE); + std::shared_ptr db; inputBuffers.push_back(db); - int32_t rc = testFpsControllerProcess_->ProcessData(inputBuffers); + rc = testFpsControllerProcess_->ProcessData(inputBuffers); + EXPECT_EQ(rc, DCAMERA_BAD_TYPE); + + inputBuffers.clear(); + size_t capacity = 100; + int64_t timeStamp = 10; + std::shared_ptr dataBuf = std::make_shared(capacity); + dataBuf->SetInt64("timeUs", timeStamp); + inputBuffers.push_back(dataBuf); + rc = testFpsControllerProcess_->ProcessData(inputBuffers); EXPECT_EQ(rc, DCAMERA_DISABLE_PROCESS); }