unitest: mi test: suppress uninteresting mock function call Wrap NVMeMiMock into NiceMock<> to suppress warning for uninteresting call. https://google.github.io/googletest/gmock_cook_book.html#NiceStrictNaggy Tested: no warning in the unitest Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I7dba915bbc8b93a0674db86275576d99c05646b1
diff --git a/tests/test_nvme_mi.cpp b/tests/test_nvme_mi.cpp index daaa801..08b8e8b 100644 --- a/tests/test_nvme_mi.cpp +++ b/tests/test_nvme_mi.cpp
@@ -193,7 +193,8 @@ protected: NVMeTest() : object_server(systemBus), - nvme_intf(NVMeIntf::create<NVMeMiMock>(io, subsysPollTime / 10)), + nvme_intf(NVMeIntf::create<::testing::NiceMock<NVMeMiMock>>( + io, subsysPollTime / 10)), mock(*std::dynamic_pointer_cast<NVMeMiMock>( std::get<std::shared_ptr<NVMeMiIntf>>(nvme_intf.getInferface()))), subsys(std::make_shared<NVMeSubsystem>(io, object_server, systemBus,