MdeModulePkg: Add more PciHostBridgeLib gmock support
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4443 Add Google Mock Library for PciHostBridgeLib Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Chris Johnson <chris.n.johnson@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/** @file
|
||||
Google Test mocks for PciHostBridgeLib
|
||||
|
||||
Copyright (c) 2023, Intel Corporation. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
||||
#ifndef MOCK_PCI_HOST_BRIDGE_LIB_H_
|
||||
#define MOCK_PCI_HOST_BRIDGE_LIB_H_
|
||||
|
||||
#include <Library/GoogleTestLib.h>
|
||||
#include <Library/FunctionMockLib.h>
|
||||
extern "C" {
|
||||
#include <Uefi.h>
|
||||
#include <Library/PciHostBridgeLib.h>
|
||||
}
|
||||
|
||||
struct MockPciHostBridgeLib {
|
||||
MOCK_INTERFACE_DECLARATION (MockPciHostBridgeLib);
|
||||
|
||||
MOCK_FUNCTION_DECLARATION (
|
||||
PCI_ROOT_BRIDGE *,
|
||||
PciHostBridgeGetRootBridges,
|
||||
(UINTN *Count)
|
||||
);
|
||||
MOCK_FUNCTION_DECLARATION (
|
||||
VOID,
|
||||
PciHostBridgeFreeRootBridges,
|
||||
(PCI_ROOT_BRIDGE *Bridges,
|
||||
UINTN Count)
|
||||
);
|
||||
MOCK_FUNCTION_DECLARATION (
|
||||
VOID,
|
||||
PciHostBridgeResourceConflict,
|
||||
(EFI_HANDLE HostBridgeHandle,
|
||||
VOID *Configuration)
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user