diff options
author | devel@edk2.groups.io <devel@edk2.groups.io> | 2022-11-30 15:02:15 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-14 23:48:30 +0000 |
commit | 44fc90eb0ea7299abc79577db55aa6257b46b7ae (patch) | |
tree | d4bbffd96003f9e50f69cff2f35bea0d93e03937 /UnitTestFrameworkPkg | |
parent | cda98df16228970dcf9a4ce2af5368219711b4b0 (diff) | |
download | edk2-44fc90eb0ea7299abc79577db55aa6257b46b7ae.tar.gz edk2-44fc90eb0ea7299abc79577db55aa6257b46b7ae.tar.bz2 edk2-44fc90eb0ea7299abc79577db55aa6257b46b7ae.zip |
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@nvidia.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'UnitTestFrameworkPkg')
-rw-r--r-- | UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 |
1 files changed, 1 insertions, 1 deletions
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);
|