]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/Include: Hook DebugLib _ASSERT() for unit tests
authorMichael D Kinney <michael.d.kinney@intel.com>
Thu, 11 Jun 2020 01:00:37 +0000 (18:00 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 15 Jul 2020 05:25:21 +0000 (05:25 +0000)
commit75e92c13541672a3af349067a040b9dda3d4452d
tree857d9c99c562b33cd7511c88d7c720969f0d1d29
parent26824851b041d9e81921ec7ef97220d2a2576157
MdePkg/Include: Hook DebugLib _ASSERT() for unit tests

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

Update DebugLib.h _ASSERT() macro to check if unit testing
is enabled and call UnitTestDebugAssert() instead of
DebugAssert() so the an ASSERT() condition that is triggered
by a function under test can be handled by the Unit Test
Framework.

If EDKII_UNIT_TEST_FRAMEWORK_ENABLED is not defined, then
the existing DebugLib behavior is preserved.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Library/DebugLib.h