From 345357c526661295f0f43cd72e47cfed85ae4a10 Mon Sep 17 00:00:00 2001 From: TsunFeng Date: Wed, 23 Oct 2024 22:26:57 +0800 Subject: [PATCH] Add mock function into MockIoLib --- MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h | 9 +++++++++ .../Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp | 1 + 2 files changed, 10 insertions(+) diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h index 891dca708b..561955c20f 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h @@ -129,6 +129,15 @@ struct MockIoLib { IN UINT64 Value ) ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoWrite16, + ( + IN UINTN Port, + IN UINT16 Value + ) + ); }; #endif diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp b/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp index d607eaa5d6..7bd5322c27 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp @@ -22,3 +22,4 @@ MOCK_FUNCTION_DEFINITION (MockIoLib, MmioRead32, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWrite32, 2, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioRead64, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWrite64, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite16, 2, EFIAPI);