diff --git a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockVariablePolicyHelperLib.h b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockVariablePolicyHelperLib.h index 57721f3e84..585b1266bf 100644 --- a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockVariablePolicyHelperLib.h +++ b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockVariablePolicyHelperLib.h @@ -21,6 +21,34 @@ extern "C" { struct MockVariablePolicyHelperLib { MOCK_INTERFACE_DECLARATION (MockVariablePolicyHelperLib); + MOCK_FUNCTION_DECLARATION ( + EFI_STATUS, + CreateBasicVariablePolicy, + (IN CONST EFI_GUID *Namespace, + IN CONST CHAR16 *Name OPTIONAL, + IN UINT32 MinSize, + IN UINT32 MaxSize, + IN UINT32 AttributesMustHave, + IN UINT32 AttributesCantHave, + IN UINT8 LockPolicyType, + OUT VARIABLE_POLICY_ENTRY **NewEntry) + ); + + MOCK_FUNCTION_DECLARATION ( + EFI_STATUS, + CreateVarStateVariablePolicy, + (IN CONST EFI_GUID *Namespace, + IN CONST CHAR16 *Name OPTIONAL, + IN UINT32 MinSize, + IN UINT32 MaxSize, + IN UINT32 AttributesMustHave, + IN UINT32 AttributesCantHave, + IN CONST EFI_GUID *VarStateNamespace, + IN UINT8 VarStateValue, + IN CONST CHAR16 *VarStateName, + OUT VARIABLE_POLICY_ENTRY **NewEntry) + ); + MOCK_FUNCTION_DECLARATION ( EFI_STATUS, RegisterBasicVariablePolicy, @@ -33,6 +61,21 @@ struct MockVariablePolicyHelperLib { IN UINT32 AttributesCantHave, IN UINT8 LockPolicyType) ); + + MOCK_FUNCTION_DECLARATION ( + EFI_STATUS, + RegisterVarStateVariablePolicy, + (IN EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy, + IN CONST EFI_GUID *Namespace, + IN CONST CHAR16 *Name OPTIONAL, + IN UINT32 MinSize, + IN UINT32 MaxSize, + IN UINT32 AttributesMustHave, + IN UINT32 AttributesCantHave, + IN CONST EFI_GUID *VarStateNamespace, + IN CONST CHAR16 *VarStateName, + IN UINT8 VarStateValue) + ); }; #endif diff --git a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockVariablePolicyHelperLib/MockVariablePolicyHelperLib.cpp b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockVariablePolicyHelperLib/MockVariablePolicyHelperLib.cpp index 3bd2a3e577..413d7b62e0 100644 --- a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockVariablePolicyHelperLib/MockVariablePolicyHelperLib.cpp +++ b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockVariablePolicyHelperLib/MockVariablePolicyHelperLib.cpp @@ -8,4 +8,7 @@ #include MOCK_INTERFACE_DEFINITION (MockVariablePolicyHelperLib); +MOCK_FUNCTION_DEFINITION (MockVariablePolicyHelperLib, CreateBasicVariablePolicy, 8, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockVariablePolicyHelperLib, CreateVarStateVariablePolicy, 10, EFIAPI); MOCK_FUNCTION_DEFINITION (MockVariablePolicyHelperLib, RegisterBasicVariablePolicy, 8, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockVariablePolicyHelperLib, RegisterVarStateVariablePolicy, 10, EFIAPI);