TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestResultReportLib.c File Reference

Go to the source code of this file.

Data Structures

struct  _UNIT_TEST_STATUS_STRING
 
struct  _UNIT_TEST_FAILURE_TYPE_STRING
 

Functions

VOID EFIAPI ReportPrint (IN CONST CHAR8 *Format,...)
 
VOID ReportOutput (IN CONST CHAR8 *Output)
 
STATIC CONST CHAR8 * GetStringForUnitTestStatus (IN UNIT_TEST_STATUS Status)
 
STATIC CONST CHAR8 * GetStringForFailureType (IN FAILURE_TYPE Failure)
 
EFI_STATUS EFIAPI OutputUnitTestFrameworkReport (IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle)
 

Variables

struct _UNIT_TEST_STATUS_STRING mStatusStrings []
 
struct _UNIT_TEST_FAILURE_TYPE_STRING mFailureTypeStrings []
 

Detailed Description

Implement UnitTestResultReportLib doing plain txt out to console

Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UnitTestResultReportLib.c.

Function Documentation

◆ GetStringForFailureType()

STATIC CONST CHAR8 * GetStringForFailureType ( IN FAILURE_TYPE  Failure)

Definition at line 87 of file UnitTestResultReportLib.c.

◆ GetStringForUnitTestStatus()

STATIC CONST CHAR8 * GetStringForUnitTestStatus ( IN UNIT_TEST_STATUS  Status)

Definition at line 64 of file UnitTestResultReportLib.c.

◆ OutputUnitTestFrameworkReport()

EFI_STATUS EFIAPI OutputUnitTestFrameworkReport ( IN UNIT_TEST_FRAMEWORK_HANDLE  FrameworkHandle)

Method to produce the Unit Test run results

Return values
Success

Definition at line 116 of file UnitTestResultReportLib.c.

◆ ReportOutput()

VOID ReportOutput ( IN CONST CHAR8 *  Output)

Definition at line 37 of file UnitTestResultReportLibConOut.c.

◆ ReportPrint()

VOID EFIAPI ReportPrint ( IN CONST CHAR8 *  Format,
  ... 
)

Definition at line 16 of file UnitTestResultReportLibConOut.c.

Variable Documentation

◆ mFailureTypeStrings

struct _UNIT_TEST_FAILURE_TYPE_STRING mFailureTypeStrings[]
Initial value:
= {
{ FAILURETYPE_NOFAILURE, "NO FAILURE" },
{ FAILURETYPE_OTHER, "OTHER FAILURE" },
{ FAILURETYPE_ASSERTTRUE, "ASSERT_TRUE FAILURE" },
{ FAILURETYPE_ASSERTFALSE, "ASSERT_FALSE FAILURE" },
{ FAILURETYPE_ASSERTEQUAL, "ASSERT_EQUAL FAILURE" },
{ FAILURETYPE_ASSERTNOTEQUAL, "ASSERT_NOTEQUAL FAILURE" },
{ FAILURETYPE_ASSERTNOTEFIERROR, "ASSERT_NOTEFIERROR FAILURE" },
{ FAILURETYPE_ASSERTSTATUSEQUAL, "ASSERT_STATUSEQUAL FAILURE" },
{ FAILURETYPE_ASSERTNOTNULL, "ASSERT_NOTNULL FAILURE" },
{ FAILURETYPE_EXPECTASSERT, "EXPECT_ASSERT FAILURE" },
{ 0, "*UNKNOWN* Failure" }
}

Definition at line 44 of file UnitTestResultReportLib.c.

◆ mStatusStrings

struct _UNIT_TEST_STATUS_STRING mStatusStrings[]
Initial value:
= {
{ UNIT_TEST_PASSED, "PASSED" },
{ UNIT_TEST_ERROR_PREREQUISITE_NOT_MET, "NOT RUN - PREREQUISITE FAILED" },
{ UNIT_TEST_ERROR_TEST_FAILED, "FAILED" },
{ UNIT_TEST_RUNNING, "RUNNING" },
{ UNIT_TEST_PENDING, "PENDING" },
{ 0, "**UNKNOWN**" }
}

Definition at line 35 of file UnitTestResultReportLib.c.