TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/FmpDependencyLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UnitTestLib.h>
Go to the source code of this file.
Data Structures | |
struct | BASIC_TEST_CONTEXT |
Macros | |
#define | UNIT_TEST_APP_NAME "FmpDependencyLib Unit Test Application" |
#define | UNIT_TEST_APP_VERSION "1.0" |
#define | IMAGE_TYPE_ID_1 { 0x97144DFA, 0xEB8E, 0xD14D, {0x8B, 0x4D, 0x39, 0x88, 0x24, 0x96, 0x56, 0x42}} |
#define | IMAGE_TYPE_ID_2 { 0xA42A7370, 0x433A, 0x684D, {0x9A, 0xA1, 0xDE, 0x62, 0x23, 0x30, 0x6C, 0xF3}} |
Functions | |
STATIC UNIT_TEST_STATUS EFIAPI | EvaluateDependencyTest (IN UNIT_TEST_CONTEXT Context) |
STATIC EFI_STATUS EFIAPI | UnitTestingEntry (VOID) |
EFI_STATUS EFIAPI | FmpDependencyLibUnitTestAppEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
int | main (int argc, char *argv[]) |
Unit tests of EvaluateDependency API in FmpDependencyLib.
Copyright (c) 2020, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EvaluateDependencyUnitTest.c.
#define IMAGE_TYPE_ID_1 { 0x97144DFA, 0xEB8E, 0xD14D, {0x8B, 0x4D, 0x39, 0x88, 0x24, 0x96, 0x56, 0x42}} |
Definition at line 30 of file EvaluateDependencyUnitTest.c.
#define IMAGE_TYPE_ID_2 { 0xA42A7370, 0x433A, 0x684D, {0x9A, 0xA1, 0xDE, 0x62, 0x23, 0x30, 0x6C, 0xF3}} |
Definition at line 35 of file EvaluateDependencyUnitTest.c.
#define UNIT_TEST_APP_NAME "FmpDependencyLib Unit Test Application" |
Definition at line 18 of file EvaluateDependencyUnitTest.c.
#define UNIT_TEST_APP_VERSION "1.0" |
Definition at line 19 of file EvaluateDependencyUnitTest.c.
STATIC UNIT_TEST_STATUS EFIAPI EvaluateDependencyTest | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Unit test for EvaluateDependency() API of the FmpDependencyLib.
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 216 of file EvaluateDependencyUnitTest.c.
EFI_STATUS EFIAPI FmpDependencyLibUnitTestAppEntry | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Standard UEFI entry point for target based unit test execution from UEFI Shell.
Definition at line 315 of file EvaluateDependencyUnitTest.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Standard POSIX C entry point for host based unit test execution.
Definition at line 327 of file EvaluateDependencyUnitTest.c.
STATIC EFI_STATUS EFIAPI UnitTestingEntry | ( | VOID | ) |
Initialize the unit test framework, suite, and unit tests for the EvaluateDependency API in FmpDependencyLib and run the unit tests.
EFI_SUCCESS | All test cases were dispatched. |
EFI_OUT_OF_RESOURCES | There are not enough resources available to initialize the unit tests. |
Definition at line 250 of file EvaluateDependencyUnitTest.c.