Fix IHalTest.

This commit is contained in:
xiaojiazhu 2023-08-17 08:26:56 -07:00
parent 080c1f6c64
commit 8fece6d8c6
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,11 @@ RETURN_CODE_C create_hal_module(void)
} }
return CreateReturnCode(C_RETURN_CODE_NOT_OK); return CreateReturnCode(C_RETURN_CODE_NOT_OK);
} }
RETURN_CODE_C destroy_hal_module(void)
{
reset_hal_impl(NULL);
return CreateReturnCode(C_RETURN_CODE_OK);
}
std::shared_ptr<HalMakePtr> &HalMakePtr::GetInstance(std::shared_ptr<HalMakePtr> *impl) std::shared_ptr<HalMakePtr> &HalMakePtr::GetInstance(std::shared_ptr<HalMakePtr> *impl)
{ {
static auto instance = std::make_shared<HalMakePtr>(); static auto instance = std::make_shared<HalMakePtr>();

View File

@ -1,6 +1,6 @@
#include "Log.h" #include "Log.h"
#include "i_hal.h" #include "IHal.h"
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
namespace IHalTest namespace IHalTest