diff options
author | Guomin Jiang <guomin.jiang@intel.com> | 2020-03-26 15:17:59 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-27 02:03:41 +0000 |
commit | 381f8ef6a176b41c350a7c50da403c30da70cde7 (patch) | |
tree | cd5a601d49a28873d45fb6d4b4fe4703c7bd712d | |
parent | 5bc09cf05a98784d483d9bb9d95a65f14eadb5f6 (diff) | |
download | edk2-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>
-rw-r--r-- | UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c | 4 |
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
|