summaryrefslogtreecommitdiffstats
path: root/UnitTestFrameworkPkg
diff options
context:
space:
mode:
authorGuomin Jiang <guomin.jiang@intel.com>2020-03-26 15:17:59 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-03-27 02:03:41 +0000
commit381f8ef6a176b41c350a7c50da403c30da70cde7 (patch)
treecd5a601d49a28873d45fb6d4b4fe4703c7bd712d /UnitTestFrameworkPkg
parent5bc09cf05a98784d483d9bb9d95a65f14eadb5f6 (diff)
downloadedk2-381f8ef6a176b41c350a7c50da403c30da70cde7.tar.gz
edk2-381f8ef6a176b41c350a7c50da403c30da70cde7.tar.bz2
edk2-381f8ef6a176b41c350a7c50da403c30da70cde7.zip
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>
Diffstat (limited to 'UnitTestFrameworkPkg')
-rw-r--r--UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
index 687a04f55d..eba68e330c 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
@@ -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