From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web09.5317.1667890762998298282 for ; Mon, 07 Nov 2022 22:59:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=pAUedsam; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 96035CD1F807 for ; Tue, 8 Nov 2022 14:59:19 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1667890759; bh=KJBXuFey6/Zm3CeE+HszkndCBLJy8SZO1GNuD5PR4gI=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=pAUedsamqwexjSLHvHsZqK3qmUniD1/fBI5FjAW7oRf+BW9+i49m2mDN3NdGvRDhg 3SxTr+qp2k4Pb1MesgRYJgxjBULz6TxD646DcJQTCK+0QQ9n9TYvBdVegxkFJViC11 6ZayswENEiYOl6No50iXDpvBiH+dLSh+b2R8NmU8= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 92CEDCD1F67A for ; Tue, 8 Nov 2022 14:59:19 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 6B9BACD1F637 for ; Tue, 8 Nov 2022 14:59:19 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 124C3CD1F676 for ; Tue, 8 Nov 2022 14:59:16 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 08 Nov 2022 14:59:15 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Michael D Kinney'" , Cc: "'Zhiguang Liu'" References: <20221104202528.1157-1-michael.d.kinney@intel.com> <20221104202528.1157-3-michael.d.kinney@intel.com> In-Reply-To: <20221104202528.1157-3-michael.d.kinney@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbUGF0Y2ggVjIgMi83XSBNZGVQa2cvSW5jbHVkZS9MaWJyYXJ5OiBVbmRlZmluZSBfQVNTRVJUKCkgaWYgYWxyZWFkeSBkZWZpbmVk?= Date: Tue, 8 Nov 2022 14:59:14 +0800 Message-ID: <034601d8f33f$9e37b5d0$daa72170$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFH1jmsDKlCXelHkMPmoRIYImxWkgJoA9Cor0OSpuA= Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Michael D Kinney > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA11=D4=C25=C8=D5 4:25 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Liming Gao ; Zhiguang Liu > > =D6=F7=CC=E2: [Patch V2 2/7] MdePkg/Include/Library: Undefine = _ASSERT() if already > defined >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4134 >=20 > When unit testing is enabled, make sure _ASSERT() is not already > defined by the host environment before defining _ASSERT(). This > avoids conflicts with VS20xx builds of GoogleTest based unit tests. >=20 > Cc: Liming Gao > Cc: Zhiguang Liu > Signed-off-by: Michael D Kinney > --- > MdePkg/Include/Library/DebugLib.h | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/MdePkg/Include/Library/DebugLib.h > b/MdePkg/Include/Library/DebugLib.h > index 8d3d08638d73..9110be2f41b3 100644 > --- a/MdePkg/Include/Library/DebugLib.h > +++ b/MdePkg/Include/Library/DebugLib.h > @@ -337,6 +337,9 @@ UnitTestDebugAssert ( > IN CONST CHAR8 *Description > ); >=20 > + #if defined (_ASSERT) > + #undef _ASSERT > + #endif > #if defined (__clang__) && defined (__FILE_NAME__) > #define _ASSERT(Expression) UnitTestDebugAssert (__FILE_NAME__, > DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression)) > #else > -- > 2.37.1.windows.1