From c41e6949328e58241970902dc73f62cb12d685ac Mon Sep 17 00:00:00 2001 From: TsunFeng Date: Mon, 22 Jul 2024 13:26:59 +0800 Subject: [PATCH] Added mock functions on UefiLib Added mock functions on UefiLib Signed-off-by: TsunFeng --- .../Test/Mock/Include/GoogleTest/Library/MockUefiLib.h | 10 ++++++++++ .../Library/GoogleTest/MockUefiLib/MockUefiLib.cpp | 1 + 2 files changed, 11 insertions(+) diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h index 93697da9cf..74ff785c96 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h @@ -34,6 +34,16 @@ struct MockUefiLib { OUT VOID **Value, OUT UINTN *Size OPTIONAL) ); + + MOCK_FUNCTION_DECLARATION ( + EFI_EVENT, + EfiCreateProtocolNotifyEvent, + (IN EFI_GUID *ProtocolGuid, + IN EFI_TPL NotifyTpl, + IN EFI_EVENT_NOTIFY NotifyFunction, + IN VOID *NotifyContext OPTIONAL, + OUT VOID **Registration) + ); }; #endif diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp index 2a0c9613ea..4822550c4d 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp @@ -10,3 +10,4 @@ MOCK_INTERFACE_DEFINITION (MockUefiLib); MOCK_FUNCTION_DEFINITION (MockUefiLib, GetVariable2, 4, EFIAPI); MOCK_FUNCTION_DEFINITION (MockUefiLib, GetEfiGlobalVariable2, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockUefiLib, EfiCreateProtocolNotifyEvent, 5, EFIAPI);