summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
diff options
context:
space:
mode:
authorGua Guo <gua.guo@intel.com>2023-05-05 09:16:56 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-05-10 00:39:13 +0000
commit25c9d4431580e68b9f11656163d032bc862c7e9b (patch)
tree64839ea5b61561a43359ee14e419d2668857f972 /MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
parentbee67e0c142af6599a85aa7640094816b8a24c4f (diff)
downloadedk2-25c9d4431580e68b9f11656163d032bc862c7e9b.tar.gz
edk2-25c9d4431580e68b9f11656163d032bc862c7e9b.tar.bz2
edk2-25c9d4431580e68b9f11656163d032bc862c7e9b.zip
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>
Diffstat (limited to 'MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h')
-rw-r--r--MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
new file mode 100644
index 0000000000..a63bed895c
--- /dev/null
+++ b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h
@@ -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