MdePkg: Test: Add gRT_GetTime Google Test Mock
This adds support for GetTime Google Test Mock Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
458c582685
commit
7f04c7a253
@@ -37,6 +37,13 @@ struct MockUefiRuntimeServicesTableLib {
|
|||||||
IN UINTN DataSize,
|
IN UINTN DataSize,
|
||||||
IN VOID *Data)
|
IN VOID *Data)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
MOCK_FUNCTION_DECLARATION (
|
||||||
|
EFI_STATUS,
|
||||||
|
gRT_GetTime,
|
||||||
|
(OUT EFI_TIME *Time,
|
||||||
|
OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -10,11 +10,12 @@ MOCK_INTERFACE_DEFINITION (MockUefiRuntimeServicesTableLib);
|
|||||||
|
|
||||||
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetVariable, 5, EFIAPI);
|
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetVariable, 5, EFIAPI);
|
||||||
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_SetVariable, 5, EFIAPI);
|
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_SetVariable, 5, EFIAPI);
|
||||||
|
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetTime, 2, EFIAPI);
|
||||||
|
|
||||||
static EFI_RUNTIME_SERVICES localRt = {
|
static EFI_RUNTIME_SERVICES localRt = {
|
||||||
{ 0 }, // EFI_TABLE_HEADER
|
{ 0 }, // EFI_TABLE_HEADER
|
||||||
|
|
||||||
NULL, // EFI_GET_TIME
|
gRT_GetTime, // EFI_GET_TIME
|
||||||
NULL, // EFI_SET_TIME
|
NULL, // EFI_SET_TIME
|
||||||
NULL, // EFI_GET_WAKEUP_TIME
|
NULL, // EFI_GET_WAKEUP_TIME
|
||||||
NULL, // EFI_SET_WAKEUP_TIME
|
NULL, // EFI_SET_WAKEUP_TIME
|
||||||
|
Reference in New Issue
Block a user