UnitTestFrameworkPkg/ResultReportLib: Remove invalid index string indicator

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2535

The UNIT_TEST_STATUS and FAILURE_TYPE have used 0 as status, so use 0 as
unknown is confused, remove it from array enumeration but keep it
location in the array.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
This commit is contained in:
Guomin Jiang 2020-03-26 15:17:59 +08:00 committed by mergify[bot]
parent 5bc09cf05a
commit 381f8ef6a1
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ GetStringForUnitTestStatus (
{
UINTN Index;
for (Index = 0; Index < ARRAY_SIZE (mStatusStrings); Index++) {
for (Index = 0; Index < ARRAY_SIZE (mStatusStrings) - 1; Index++) {
if (mStatusStrings[Index].Status == Status) {
//
// Return string from matching entry
@ -87,7 +87,7 @@ GetStringForFailureType (
{
UINTN Index;
for (Index = 0; Index < ARRAY_SIZE (mFailureTypeStrings); Index++) {
for (Index = 0; Index < ARRAY_SIZE (mFailureTypeStrings) - 1; Index++) {
if (mFailureTypeStrings[Index].Type == Failure) {
//
// Return string from matching entry