TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestDebugAssertLib.c File Reference
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/UnitTestLib.h>

Go to the source code of this file.

Functions

VOID EFIAPI UnitTestDebugAssert (IN CONST CHAR8 *FileName, IN UINTN LineNumber, IN CONST CHAR8 *Description)
 

Variables

BASE_LIBRARY_JUMP_BUFFER * gUnitTestExpectAssertFailureJumpBuffer = NULL
 

Detailed Description

Unit Test Debug Assert Library

Copyright (c) 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UnitTestDebugAssertLib.c.

Function Documentation

◆ UnitTestDebugAssert()

VOID EFIAPI UnitTestDebugAssert ( IN CONST CHAR8 *  FileName,
IN UINTN  LineNumber,
IN CONST CHAR8 *  Description 
)

Unit test library replacement for DebugAssert() in DebugLib.

If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed. If Description is NULL, then a string of "(NULL) Description" is printed.

Parameters
FileNameThe pointer to the name of the source file that generated the assert condition.
LineNumberThe line number in the source file that generated the assert condition
DescriptionThe pointer to the description of the assert condition.

Definition at line 32 of file UnitTestDebugAssertLib.c.

Variable Documentation

◆ gUnitTestExpectAssertFailureJumpBuffer

BASE_LIBRARY_JUMP_BUFFER* gUnitTestExpectAssertFailureJumpBuffer = NULL

Point to jump buffer used with SetJump()/LongJump() to test if a function under test generates an expected ASSERT() condition.

Definition at line 17 of file UnitTestDebugAssertLib.c.