TianoCore EDK2 master
|
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PrmModuleDiscoveryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UnitTestLib.h>
#include "../PrmModuleDiscovery.h"
Go to the source code of this file.
Macros | |
#define | UNIT_TEST_NAME "PRM Module Discovery Library Unit Test" |
#define | UNIT_TEST_VERSION "0.1" |
Functions | |
UNIT_TEST_STATUS EFIAPI | PrmModuleImageContextListEntryShouldDeallocate (IN UNIT_TEST_CONTEXT Context) |
=== TEST CASES ================================================================================= | |
UNIT_TEST_STATUS EFIAPI | PrmModuleImageContextListEntrySignatureShouldBeValid (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | PrmModuleImageContextListEntryImageContextShouldBeZeroed (IN UNIT_TEST_CONTEXT Context) |
int | main () |
=== TEST ENGINE ================================================================================ | |
Unit tests for the PRM Module Discovery Library.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxePrmModuleDiscoveryLibUnitTest.c.
#define UNIT_TEST_NAME "PRM Module Discovery Library Unit Test" |
Definition at line 27 of file DxePrmModuleDiscoveryLibUnitTest.c.
#define UNIT_TEST_VERSION "0.1" |
Definition at line 28 of file DxePrmModuleDiscoveryLibUnitTest.c.
int main | ( | ) |
=== TEST ENGINE ================================================================================
Entry point for the PRM Context Buffer Library unit tests.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The entry point executed successfully. |
other | Some error occurred when executing this entry point. |
Definition at line 135 of file DxePrmModuleDiscoveryLibUnitTest.c.
UNIT_TEST_STATUS EFIAPI PrmModuleImageContextListEntryImageContextShouldBeZeroed | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Verifies that the Context buffer in the list entry is initialized to zero.
[in] | Context | [Optional] An optional context parameter. Not used in this unit test. |
UNIT_TEST_PASSED | Unit test case prerequisites are met. |
UNIT_TEST_ERROR_PREREQUISITE_NOT_MET | Test case should be skipped.. |
Definition at line 103 of file DxePrmModuleDiscoveryLibUnitTest.c.
UNIT_TEST_STATUS EFIAPI PrmModuleImageContextListEntryShouldDeallocate | ( | IN UNIT_TEST_CONTEXT | Context | ) |
=== TEST CASES =================================================================================
===== CREATE NEW PRM MODULE IMAGE CONTEXT LIST ENTRY TESTS SUITE ================================================== Verifies that the buffer returned can be deallocated.
[in] | Context | [Optional] An optional context parameter. Not used in this unit test. |
UNIT_TEST_PASSED | Unit test case prerequisites are met. |
UNIT_TEST_ERROR_PREREQUISITE_NOT_MET | Test case should be skipped.. |
Definition at line 46 of file DxePrmModuleDiscoveryLibUnitTest.c.
UNIT_TEST_STATUS EFIAPI PrmModuleImageContextListEntrySignatureShouldBeValid | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Verifies that the list entry signature is set to the appropriate value.
[in] | Context | [Optional] An optional context parameter. Not used in this unit test. |
UNIT_TEST_PASSED | Unit test case prerequisites are met. |
UNIT_TEST_ERROR_PREREQUISITE_NOT_MET | Test case should be skipped.. |
Definition at line 74 of file DxePrmModuleDiscoveryLibUnitTest.c.