[edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail
Michael D Kinney
michael.d.kinney at intel.com
Wed Dec 14 23:49:07 UTC 2022
Merged
PR: https://github.com/tianocore/edk2/pull/3771
Commit: https://github.com/tianocore/edk2/commit/44fc90eb0ea7299abc79577db55aa6257b46b7ae
Mike
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney at intel.com>
> Sent: Wednesday, December 14, 2022 3:10 PM
> To: devel at edk2.groups.io; jeshuas at nvidia.com; Kinney, Michael D <michael.d.kinney at intel.com>
> Cc: mikuback at linux.microsoft.com; sean.brogan at microsoft.com
> Subject: RE: [edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail
>
> Reviewed-by: Michael D Kinney <michael.d.kinney at intel.com>
>
>
> > -----Original Message-----
> > From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Jeshua Smith via groups.io
> > Sent: Wednesday, November 30, 2022 3:02 PM
> > To: devel at edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney at intel.com>; mikuback at linux.microsoft.com; sean.brogan at microsoft.com; Jeshua
> Smith
> > <jeshuas at nvidia.com>
> > Subject: [edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail
> >
> > Update the UnitTestAssertStatusEqual error message to print out the
> > expected value in addition to the seen value.
> >
> > Signed-off-by: Jeshua Smith <jeshuas at nvidia.com>
> > ---
> > UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > index dc05bbd438..0d8e36c938 100644
> > --- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > @@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
> > {
> > CHAR8 TempStr[MAX_STRING_SIZE];
> >
> > - snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", Description, (VOID *)Status);
> > + snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p expected:%p)", Description, (VOID *)Status, (VOID
> > *)Expected);
> > _assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
> >
> > return (Status == Expected);
> > --
> > 2.25.1
> >
> >
> >
> >
> >
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97404): https://edk2.groups.io/g/devel/message/97404
Mute This Topic: https://groups.io/mt/95370662/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list