mirror of
https://github.com/acidanthera/audk.git
synced 2025-08-18 16:18:12 +02:00
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>
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
/** @file
|
|
Google Test mocks for UefiRuntimeServicesTableLib
|
|
|
|
Copyright (c) 2022, Intel Corporation. All rights reserved.
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
**/
|
|
|
|
#ifndef MOCK_UEFI_RUNTIME_SERVICES_TABLE_LIB_H_
|
|
#define MOCK_UEFI_RUNTIME_SERVICES_TABLE_LIB_H_
|
|
|
|
#include <Library/GoogleTestLib.h>
|
|
#include <Library/FunctionMockLib.h>
|
|
extern "C" {
|
|
#include <Uefi.h>
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
}
|
|
|
|
struct MockUefiRuntimeServicesTableLib {
|
|
MOCK_INTERFACE_DECLARATION (MockUefiRuntimeServicesTableLib);
|
|
|
|
MOCK_FUNCTION_DECLARATION (
|
|
EFI_STATUS,
|
|
gRT_GetVariable,
|
|
(IN CHAR16 *VariableName,
|
|
IN EFI_GUID *VendorGuid,
|
|
OUT UINT32 *Attributes OPTIONAL,
|
|
IN OUT UINTN *DataSize,
|
|
OUT VOID *Data)
|
|
);
|
|
|
|
MOCK_FUNCTION_DECLARATION (
|
|
EFI_STATUS,
|
|
gRT_SetVariable,
|
|
(IN CHAR16 *VariableName,
|
|
IN EFI_GUID *VendorGuid,
|
|
IN UINT32 Attributes,
|
|
IN UINTN DataSize,
|
|
IN VOID *Data)
|
|
);
|
|
|
|
MOCK_FUNCTION_DECLARATION (
|
|
EFI_STATUS,
|
|
gRT_GetTime,
|
|
(OUT EFI_TIME *Time,
|
|
OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL)
|
|
);
|
|
};
|
|
|
|
#endif
|