From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107667+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107667+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627043; cv=none; d=zohomail.com; s=zohoarc; b=oJTWSWSQMmUFRbz7PtUCK1qwUB+LRralUf77OxBFhsGj34CLVgmlK+86bdYmVmszSbvNK7bOFFBTcunCH+jmu/2liqJTgZJy13ut5duY7Av6pBpoXoLw565Velu3v96hg3s3fjCpQFK9PPxBUxfMhZDL8xVrDKmbuMyyPEciNxw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627043; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=e3rzn/IeD6q4pss4rgUWd0YUxUjqn5RcgIaPOOUUJMQ=; b=U/i7sKgvuhAvt13YisqSezyVKqkekMg29ZhCmbU2/36Vs3zd/HrTt22EXruux6IMp2e4DpZWcGpY3Pp47GgzoXot5ZT7jB5bD4YV8AL8/+E7GHUcdNR1fUBbNiDPcDLbypjCQVZ4ZihGCx2Xcj0b3ApQ28+EvPYsxWsLRgN9ZlA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107667+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1691627043794652.130461868867; Wed, 9 Aug 2023 17:24:03 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=NWC9URjXLqH2rqwoqU4Q+tP9ZTsxWX0ZIRawHmvJ1oE=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627043; v=1; b=tdJn9XtSlmDaGrt42EPCpA36BrPJIW5cgvgYq9FY0sHcVWsDvYLYXfbhFyLbzNAXd7L0a08i JykYXpAX277vVKnDRH4cCa3qwRr/iKaANkJVSD25C9L5tSugYamuRQZmr4BCq6njlJtgdcgQzX4 05qW30fSYQKkZg0Ak3QT3Sxc= X-Received: by 127.0.0.2 with SMTP id LA1QYY1788612xPiZTNapFbF; Wed, 09 Aug 2023 17:24:03 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.3610.1691616749386987645 for ; Wed, 09 Aug 2023 14:32:29 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id CFDDF20FC4EA for ; Wed, 9 Aug 2023 14:32:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CFDDF20FC4EA From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 1/7] .pytool: Set uncrustify check to audit only Date: Wed, 9 Aug 2023 14:32:20 -0700 Message-ID: <20230809213226.1387-2-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uqCfZik8yDciROlhmILDiOJMx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627044135100005 Content-Type: text/plain; charset="utf-8" Temporarily set uncrustify to audit only to prevent build failures. CC: Sean Brogan CC: Michael Kubacki CC: Michael D Kinney CC: Liming Gao Signed-off-by: Vivian Nowka-Keane --- .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Pl= ugin/UncrustifyCheck/UncrustifyCheck.py index 8dc9ffe6945a..8978ffc443bf 100644 --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py @@ -530,7 +530,7 @@ class UncrustifyCheck(ICiBuildPlugin): """ Initializes options that influence test case output. """ - self._audit_only_mode =3D False + self._audit_only_mode =3D True self._output_file_diffs =3D True =20 if "AuditOnly" in self._package_config and self._package_config["A= uditOnly"]: --=20 2.41.0.windows.3 1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107667): https://edk2.groups.io/g/devel/message/107667 Mute This Topic: https://groups.io/mt/100655290/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107666+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107666+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627044; cv=none; d=zohomail.com; s=zohoarc; b=da+efLJ4ZrUZsksDbKFtIASuRrs30jfEdbvDd/XzLh62yGr+rXAzXOGEmuxhLIaO0pRuoH0OVYtwYiNBs7FjzSDMJBAfuWLqc0fxF7sIbxII2E2DLZNh3ujg+pIUA4124FU2uAXBLhfNJVqQZhuRNvp3iMKRSllHvI2FMWWRNg0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627044; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=RxXmIS+4Ft3R1SvJ62ASH0y0JXVifIW17GAheHIOWZQ=; b=SBMTMvIQO1oPiJfIaDx1KXb0jLShhURS3F+Gx7WslvAcEfG9SIXJMCC2RRtlaVyV360SOD+fnX3w5Co9pNK8f+vB6aQ79H2vRlR2wDQhc7WQ+0gWwKkQVbKNZmppebPdh/Au3PCNPlhSJOAP9D9N/QeAkh/v5Yz/b5/50tF0wMg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107666+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 169162704424567.14551587389712; Wed, 9 Aug 2023 17:24:04 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=t1xDMzOylYzyOs+NcVuvV4AfLcxryr0ndFuj9nCyrwQ=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627043; v=1; b=Jb+Y1eS4slUILsqL0vnTSWSfDti3n9bIqz5xmkK4wExean1LjMTAdW40HyG6R7MlJA9zJAVl ptK+cl+WRF493Tw7CebjtTfaoUdTyFUTYMmiFLZH679ovFvwIYPMak1JbleBXT12yJ9HPNToqWj hzByBFBDYcKRtkWmuolyb1Ig= X-Received: by 127.0.0.2 with SMTP id UQsnYY1788612xSNUAVepakq; Wed, 09 Aug 2023 17:24:03 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.3573.1691616749378670307 for ; Wed, 09 Aug 2023 14:32:29 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id ECDF220FC4EF for ; Wed, 9 Aug 2023 14:32:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com ECDF220FC4EF From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 2/7] .pytool: Add cpp support to uncrustify plugin Date: Wed, 9 Aug 2023 14:32:21 -0700 Message-ID: <20230809213226.1387-3-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: T1XJ6NwvXlp3GQMdm9crQ8gdx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627044671100012 Content-Type: text/plain; charset="utf-8" Modified the uncrustify config to apply cpp specific formatting rules. Modified uncrustify check to include *.cpp files. CC: Sean Brogan =20 CC: Michael Kubacki =20 CC: Michael D Kinney =20 CC: Liming Gao =20 Signed-off-by: Vivian Nowka-Keane Reviewed-by: Michael Kubacki --- .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +- .pytool/Plugin/UncrustifyCheck/uncrustify.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Pl= ugin/UncrustifyCheck/UncrustifyCheck.py index 8978ffc443bf..17f77b48d954 100644 --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py @@ -110,7 +110,7 @@ class UncrustifyCheck(ICiBuildPlugin): # A package can add any additional paths with "AdditionalIncludePaths" # A package can remove any of these paths with "IgnoreStandardPaths" # - STANDARD_PLUGIN_DEFINED_PATHS =3D ("*.c", "*.h") + STANDARD_PLUGIN_DEFINED_PATHS =3D ("*.c", "*.h", "*.cpp") =20 # # The Uncrustify application path should set in this environment varia= ble diff --git a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg b/.pytool/Plugin= /UncrustifyCheck/uncrustify.cfg index 8506c3333715..d7e86a6e57e6 100644 --- a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg +++ b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg @@ -215,7 +215,7 @@ indent_braces =3D false indent_braces_no_class =3D false indent_braces_no_func =3D true indent_braces_no_struct =3D false -indent_class =3D false +indent_class =3D true indent_class_colon =3D false indent_cmt_with_tabs =3D false # Whether to indent comm= ents that are not at a brace level with tabs on # a tabstop. Requires inde= nt_with_tabs=3D2. If false, will use spaces. @@ -223,7 +223,7 @@ indent_col1_comment =3D true indent_col1_multi_string_literal=3D true indent_comma_paren =3D true indent_else_if =3D true -indent_extern =3D false +indent_extern =3D true indent_first_bool_expr =3D true =20 indent_func_def_param_paren_pos_threshold =3D 0 --=20 2.41.0.windows.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107666): https://edk2.groups.io/g/devel/message/107666 Mute This Topic: https://groups.io/mt/100655289/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107668+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107668+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627045; cv=none; d=zohomail.com; s=zohoarc; b=QZdm+E4Fd6c79lgchvop0p5SnMzqyFQMpGJS8987Nvz4hjw3Uo3uRynOkZvsHub4MI1+qPGCqp4S/3RLC3CPkeoomroBoNCiuQyNwIrUeOOCxwrKjxiPHR0dnEghOvOEf9RjogOHmd9FlQ+5t8sdnJ82v/ISbz9KcJvbpwQa8FU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627045; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qEAszmibZC56JNMhrrbTzgb2ieFdnAc7k5aIdBED3oY=; b=HfRYBVE0ktDLBdswb8hm4mCAE4JD2ZxvW4IBbFiaEwS946G5dqOYisA0tS82dNcALQ8G+ARVb8fVThDcE/9K10LAaD1eqrZ2uq8ufqIPoSefNbp3BXnJq3t+GDtvTRgqxS+1kYIDVr+qaSXTugfcRqvDdtPHeyse0oRpnNmLyiw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107668+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1691627045111589.9971216691596; Wed, 9 Aug 2023 17:24:05 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Awd03lxmEkaCMw3dHDYM+hB+m0gk5vK75qp9clfnGGQ=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627044; v=1; b=VZ4htfzEXSS83AqP9pUm+K4uuoR3CYuzUr3sZKLXHMO6CF8B5WjjALLec7rk3nSK0PSUvPzF WAKMiZRa02whKU7cxGzYCNDu+80riIIiwT449ZV2NcEGXkkLxXuAjtfX0Bjay8t+KtgNOsicxvq jCj5jG8VNSkdQWo4h4ldh7ko= X-Received: by 127.0.0.2 with SMTP id Sm3mYY1788612xvdKJdPADGI; Wed, 09 Aug 2023 17:24:04 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.3574.1691616749438583429 for ; Wed, 09 Aug 2023 14:32:29 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id 16C8820FC4F5 for ; Wed, 9 Aug 2023 14:32:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 16C8820FC4F5 From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 3/7] MdeModulePkg: Applyy uncrustify formatting to relevant files. Date: Wed, 9 Aug 2023 14:32:22 -0700 Message-ID: <20230809213226.1387-4-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: wgI4cGpTyxgDCXtaO9Wq5hzJx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627045443100026 Content-Type: text/plain; charset="utf-8" Apply uncrustify formatting to GoogleTest cpp files and respective header file. CC: Jian J Wang =20 CC: Liming Gao CC: Hao A Wu =20 CC: Ray Ni =20 Signed-off-by: Vivian Nowka-Keane --- MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.cpp = | 37 +++++++++++--------- MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLib.h = | 4 +-- MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPciHost= BridgeLib.cpp | 8 ++--- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleT= est.cpp b/MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest= .cpp index 23f6e9cc0611..16986a512fa3 100644 --- a/MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.cpp +++ b/MdeModulePkg/Library/UefiSortLib/GoogleTest/UefiSortLibGoogleTest.cpp @@ -20,9 +20,9 @@ CompareUint32 ( IN CONST VOID *Right ) { - if (*(UINT32*)Right > *(UINT32*)Left) { + if (*(UINT32 *)Right > *(UINT32 *)Left) { return 1; - } else if (*(UINT32*)Right < *(UINT32*)Left) { + } else if (*(UINT32 *)Right < *(UINT32 *)Left) { return -1; } =20 @@ -31,31 +31,36 @@ CompareUint32 ( =20 // Test PerformQuickSort() API from UefiSortLib to verify a UINT32 array // with 9 elements in ascending order is sorted into descending order. -TEST(PerformQuickSortTest, SortUint32AscendingArray_Size9) { - CONST UINT32 ArraySize =3D 9; - UINT32 BuffActual[ArraySize]; - UINT32 BuffExpected[ArraySize]; +TEST (PerformQuickSortTest, SortUint32AscendingArray_Size9) { + CONST UINT32 ArraySize =3D 9; + UINT32 BuffActual[ArraySize]; + UINT32 BuffExpected[ArraySize]; =20 for (UINT32 Index =3D 0; Index < ArraySize; Index++) { - BuffActual[Index] =3D Index + 1; + BuffActual[Index] =3D Index + 1; BuffExpected[Index] =3D ArraySize - Index; } =20 - PerformQuickSort (BuffActual, (UINTN)ArraySize, sizeof(UINT32), (SORT_CO= MPARE)CompareUint32); - EXPECT_THAT(BuffActual, ElementsAreArray(BuffExpected, ArraySize)); + PerformQuickSort (BuffActual, (UINTN)ArraySize, sizeof (UINT32), (SORT_C= OMPARE)CompareUint32); + EXPECT_THAT (BuffActual, ElementsAreArray (BuffExpected, ArraySize)); } =20 // Test StringCompare() API from UefiSortLib to verify the comparison // succeeds when the same buffer is compared with itself. -TEST(StringCompareTest, CompareSameBuffer) { - INTN RetVal; - CONST CHAR16 *Buffer =3D (CHAR16*)L"abcdefg"; +TEST (StringCompareTest, CompareSameBuffer) { + INTN RetVal; + CONST CHAR16 *Buffer =3D (CHAR16 *)L"abcdefg"; =20 RetVal =3D StringCompare (&Buffer, &Buffer); - EXPECT_EQ(RetVal, 0); + EXPECT_EQ (RetVal, 0); } =20 -int main(int argc, char* argv[]) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); +int +main ( + int argc, + char *argv[] + ) +{ + testing::InitGoogleTest (&argc, argv); + return RUN_ALL_TESTS (); } diff --git a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostB= ridgeLib.h b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostB= ridgeLib.h index a63bed895c60..51eefa6c21e8 100644 --- a/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLi= b.h +++ b/MdeModulePkg/Test/Mock/Include/GoogleTest/Library/MockPciHostBridgeLi= b.h @@ -11,8 +11,8 @@ #include #include extern "C" { -#include -#include + #include + #include } =20 struct MockPciHostBridgeLib { diff --git a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib= /MockPciHostBridgeLib.cpp b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockP= ciHostBridgeLib/MockPciHostBridgeLib.cpp index 4b15aed16966..1891727d3b2a 100644 --- a/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPc= iHostBridgeLib.cpp +++ b/MdeModulePkg/Test/Mock/Library/GoogleTest/MockPciHostBridgeLib/MockPc= iHostBridgeLib.cpp @@ -7,8 +7,8 @@ =20 #include =20 -MOCK_INTERFACE_DEFINITION(MockPciHostBridgeLib); +MOCK_INTERFACE_DEFINITION (MockPciHostBridgeLib); =20 -MOCK_FUNCTION_DEFINITION(MockPciHostBridgeLib, PciHostBridgeGetRootBridges= , 1, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPciHostBridgeLib, PciHostBridgeFreeRootBridge= s, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPciHostBridgeLib, PciHostBridgeResourceConfli= ct, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeGetRootBridge= s, 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeFreeRootBridg= es, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeResourceConfl= ict, 2, EFIAPI); --=20 2.41.0.windows.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107668): https://edk2.groups.io/g/devel/message/107668 Mute This Topic: https://groups.io/mt/100655291/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107669+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107669+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627044; cv=none; d=zohomail.com; s=zohoarc; b=FD8XXDpVh+mxYgwuZ36i9Siq06eDoqsepX00gFuCpcFW7QJ0hYmS0te19Fux/RHIdN3cJ995ImvxCEosIkoBCq6h+B18ktl8CcZN49n5bLl66BvWrRzR2GTF6PxsFOeJ+QDCbmhumbCgRM1Ekmvm3DzKIvAsnCyXVsels6soHZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627044; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=bA8FZcGnv/a2Fv1vz0GvCXhqwunmq8qdy9rL+xF+ATk=; b=Ls663Ph9Fb7hRCsnO+2+pUs223PfvsEmK9zFW8b+bzLtEqFnPGI68rCkER701IW5iNOi/f3S8MKR8CTjn8W4lgcTY9XKpR2MmAEnIs0O9zCyW27dSS5DqgM1A2lEE4/lgmP5GMHLwbQdhp1PgXkYZkjTOjglVnKiHHw23rjTeo4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107669+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 169162704482114.08386684066113; Wed, 9 Aug 2023 17:24:04 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=yn74zQcNaGJidHUoAE++ISW7B3zJPV/WegW45mkuKkU=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627044; v=1; b=AKTV4uGBr4LtA0Fc79jgKjQQjU+aTUFZp3na0LUwGp0mr7OhIXhcl4DJYnn70QkUXSy6SA3n APezgXzVNVYDVNBJu0uK6/WrMoSLstqAPO52yLCDFQpdCMIV89tuZYpztEuYqOHs82O/enPgBNf Aj5tf8n+VUBsRfZYouwAW5v4= X-Received: by 127.0.0.2 with SMTP id wRd7YY1788612xMLJOiPxQ3F; Wed, 09 Aug 2023 17:24:04 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.3611.1691616749758302873 for ; Wed, 09 Aug 2023 14:32:29 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id 33CE220FC4FB for ; Wed, 9 Aug 2023 14:32:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 33CE220FC4FB From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 4/7] MdePkg: Apply uncrustify formatting to relevant files Date: Wed, 9 Aug 2023 14:32:23 -0700 Message-ID: <20230809213226.1387-5-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: SzF7kKsBHIR0ItFhDs53Glt1x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627045187100023 Content-Type: text/plain; charset="utf-8" Apply uncrustify formatting to GoogleTest cpp and header files. CC: Michael D Kinney CC: Liming Gao CC: Zhiguang Liu =20 Signed-off-by: Vivian Nowka-Keane --- MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests= 32.cpp | 114 ++-- MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests= 64.cpp | 114 ++-- MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.cpp = | 563 ++++++++++---------- MdePkg/Test/Mock/Include/GoogleTest/Library/MockHobLib.h = | 6 +- MdePkg/Test/Mock/Include/GoogleTest/Library/MockPeiServicesLib.h = | 6 +- MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h = | 4 +- MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeServicesTableLi= b.h | 4 +- MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.cpp = | 40 +- MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/MockPeiServicesLib.= cpp | 52 +- MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp = | 6 +- MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/MockUe= fiRuntimeServicesTableLib.cpp | 12 +- 11 files changed, 463 insertions(+), 458 deletions(-) diff --git a/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnI= ntnUnitTests32.cpp b/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntL= ibUintnIntnUnitTests32.cpp index 6fbf302c1c5e..3f50f0cd99db 100644 --- a/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnit= Tests32.cpp +++ b/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnit= Tests32.cpp @@ -14,10 +14,10 @@ extern "C" { #include } =20 -TEST(ConversionTestSuite, TestSafeInt32ToUintn) { +TEST (ConversionTestSuite, TestSafeInt32ToUintn) { RETURN_STATUS Status; - INT32 Operand; - UINTN Result; + INT32 Operand; + UINTN Result; =20 // // If Operand is non-negative, then it's a cast @@ -36,10 +36,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToIntn) { +TEST (ConversionTestSuite, TestSafeUint32ToIntn) { RETURN_STATUS Status; - UINT32 Operand; - INTN Result; + UINT32 Operand; + INTN Result; =20 // // If Operand is <=3D MAX_INTN, then it's a cast @@ -58,10 +58,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToIntn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToInt32) { +TEST (ConversionTestSuite, TestSafeIntnToInt32) { RETURN_STATUS Status; - INTN Operand; - INT32 Result; + INTN Operand; + INT32 Result; =20 // // INTN is same as INT32 in IA32, so this is just a cast @@ -73,10 +73,10 @@ TEST(ConversionTestSuite, TestSafeIntnToInt32) { ASSERT_EQ (0x5bababab, Result); } =20 -TEST(ConversionTestSuite, TestSafeIntnToUint32) { +TEST (ConversionTestSuite, TestSafeIntnToUint32) { RETURN_STATUS Status; - INTN Operand; - UINT32 Result; + INTN Operand; + UINT32 Result; =20 // // If Operand is non-negative, then it's a cast @@ -95,10 +95,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToUint32) { +TEST (ConversionTestSuite, TestSafeUintnToUint32) { RETURN_STATUS Status; - UINTN Operand; - UINT32 Result; + UINTN Operand; + UINT32 Result; =20 // // UINTN is same as UINT32 in IA32, so this is just a cast @@ -110,10 +110,10 @@ TEST(ConversionTestSuite, TestSafeUintnToUint32) { ASSERT_EQ (0xabababab, Result); } =20 -TEST(ConversionTestSuite, TestSafeUintnToIntn) { +TEST (ConversionTestSuite, TestSafeUintnToIntn) { RETURN_STATUS Status; - UINTN Operand; - INTN Result; + UINTN Operand; + INTN Result; =20 // // If Operand is <=3D MAX_INTN, then it's a cast @@ -132,10 +132,10 @@ TEST(ConversionTestSuite, TestSafeUintnToIntn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToInt64) { +TEST (ConversionTestSuite, TestSafeUintnToInt64) { RETURN_STATUS Status; - UINTN Operand; - INT64 Result; + UINTN Operand; + INT64 Result; =20 // // UINTN is same as UINT32 in IA32, and UINT32 is a subset of @@ -148,10 +148,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt64) { ASSERT_EQ (0xabababab, Result); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToIntn) { +TEST (ConversionTestSuite, TestSafeInt64ToIntn) { RETURN_STATUS Status; - INT64 Operand; - INTN Result; + INT64 Operand; + INTN Result; =20 // // If Operand is between MIN_INTN and MAX_INTN2 inclusive, then it's a = cast @@ -179,10 +179,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToIntn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToUintn) { +TEST (ConversionTestSuite, TestSafeInt64ToUintn) { RETURN_STATUS Status; - INT64 Operand; - UINTN Result; + INT64 Operand; + UINTN Result; =20 // // If Operand is between 0 and MAX_UINTN inclusive, then it's a cast @@ -205,10 +205,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToIntn) { +TEST (ConversionTestSuite, TestSafeUint64ToIntn) { RETURN_STATUS Status; - UINT64 Operand; - INTN Result; + UINT64 Operand; + INTN Result; =20 // // If Operand is <=3D MAX_INTN, then it's a cast @@ -227,10 +227,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToIntn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToUintn) { +TEST (ConversionTestSuite, TestSafeUint64ToUintn) { RETURN_STATUS Status; - UINT64 Operand; - UINTN Result; + UINT64 Operand; + UINTN Result; =20 // // If Operand is <=3D MAX_UINTN, then it's a cast @@ -249,11 +249,11 @@ TEST(ConversionTestSuite, TestSafeUint64ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) { +TEST (AdditionSubtractionTestSuite, TestSafeUintnAdd) { RETURN_STATUS Status; - UINTN Augend; - UINTN Addend; - UINTN Result; + UINTN Augend; + UINTN Addend; + UINTN Result; =20 // // If the result of addition doesn't overflow MAX_UINTN, then it's addit= ion @@ -274,11 +274,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) { +TEST (AdditionSubtractionTestSuite, TestSafeIntnAdd) { RETURN_STATUS Status; - INTN Augend; - INTN Addend; - INTN Result; + INTN Augend; + INTN Addend; + INTN Result; =20 // // If the result of addition doesn't overflow MAX_INTN @@ -311,11 +311,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) { +TEST (AdditionSubtractionTestSuite, TestSafeUintnSub) { RETURN_STATUS Status; - UINTN Minuend; - UINTN Subtrahend; - UINTN Result; + UINTN Minuend; + UINTN Subtrahend; + UINTN Result; =20 // // If Minuend >=3D Subtrahend, then it's subtraction @@ -336,11 +336,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) { +TEST (AdditionSubtractionTestSuite, TestSafeIntnSub) { RETURN_STATUS Status; - INTN Minuend; - INTN Subtrahend; - INTN Result; + INTN Minuend; + INTN Subtrahend; + INTN Result; =20 // // If the result of subtractions doesn't overflow MAX_INTN or @@ -373,11 +373,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeUintnMult) { +TEST (MultiplicationTestSuite, TestSafeUintnMult) { RETURN_STATUS Status; - UINTN Multiplicand; - UINTN Multiplier; - UINTN Result; + UINTN Multiplicand; + UINTN Multiplier; + UINTN Result; =20 // // If the result of multiplication doesn't overflow MAX_UINTN, it will s= ucceed @@ -398,11 +398,11 @@ TEST(MultiplicationTestSuite, TestSafeUintnMult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeIntnMult) { +TEST (MultiplicationTestSuite, TestSafeIntnMult) { RETURN_STATUS Status; - INTN Multiplicand; - INTN Multiplier; - INTN Result; + INTN Multiplicand; + INTN Multiplier; + INTN Result; =20 // // If the result of multiplication doesn't overflow MAX_INTN and doesn't diff --git a/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnI= ntnUnitTests64.cpp b/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntL= ibUintnIntnUnitTests64.cpp index 6fb0710cfed6..6efdd3be7c5e 100644 --- a/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnit= Tests64.cpp +++ b/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnit= Tests64.cpp @@ -14,10 +14,10 @@ extern "C" { #include } =20 -TEST(ConversionTestSuite, TestSafeInt32ToUintn) { +TEST (ConversionTestSuite, TestSafeInt32ToUintn) { RETURN_STATUS Status; - INT32 Operand; - UINTN Result; + INT32 Operand; + UINTN Result; =20 // // If Operand is non-negative, then it's a cast @@ -36,10 +36,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToIntn) { +TEST (ConversionTestSuite, TestSafeUint32ToIntn) { RETURN_STATUS Status; - UINT32 Operand; - INTN Result; + UINT32 Operand; + INTN Result; =20 // // For x64, INTN is same as INT64 which is a superset of INT32 @@ -56,10 +56,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToIntn) { ASSERT_EQ (0xabababab, Result); } =20 -TEST(ConversionTestSuite, TestSafeIntnToInt32) { +TEST (ConversionTestSuite, TestSafeIntnToInt32) { RETURN_STATUS Status; - INTN Operand; - INT32 Result; + INTN Operand; + INT32 Result; =20 // // If Operand is between MIN_INT32 and MAX_INT32 inclusive, then it's a= cast @@ -87,10 +87,10 @@ TEST(ConversionTestSuite, TestSafeIntnToInt32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToUint32) { +TEST (ConversionTestSuite, TestSafeIntnToUint32) { RETURN_STATUS Status; - INTN Operand; - UINT32 Result; + INTN Operand; + UINT32 Result; =20 // // If Operand is between 0 and MAX_UINT32 inclusive, then it's a cast @@ -113,10 +113,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToUint32) { +TEST (ConversionTestSuite, TestSafeUintnToUint32) { RETURN_STATUS Status; - UINTN Operand; - UINT32 Result; + UINTN Operand; + UINT32 Result; =20 // // If Operand is <=3D MAX_UINT32, then it's a cast @@ -135,10 +135,10 @@ TEST(ConversionTestSuite, TestSafeUintnToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToIntn) { +TEST (ConversionTestSuite, TestSafeUintnToIntn) { RETURN_STATUS Status; - UINTN Operand; - INTN Result; + UINTN Operand; + INTN Result; =20 // // If Operand is <=3D MAX_INTN (0x7fff_ffff_ffff_ffff), then it's a cast @@ -157,10 +157,10 @@ TEST(ConversionTestSuite, TestSafeUintnToIntn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToInt64) { +TEST (ConversionTestSuite, TestSafeUintnToInt64) { RETURN_STATUS Status; - UINTN Operand; - INT64 Result; + UINTN Operand; + INT64 Result; =20 // // If Operand is <=3D MAX_INT64, then it's a cast @@ -179,10 +179,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt64) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToIntn) { +TEST (ConversionTestSuite, TestSafeInt64ToIntn) { RETURN_STATUS Status; - INT64 Operand; - INTN Result; + INT64 Operand; + INTN Result; =20 // // INTN is same as INT64 in x64, so this is just a cast @@ -194,10 +194,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToIntn) { ASSERT_EQ (0x5babababefefefef, Result); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToUintn) { +TEST (ConversionTestSuite, TestSafeInt64ToUintn) { RETURN_STATUS Status; - INT64 Operand; - UINTN Result; + INT64 Operand; + UINTN Result; =20 // // If Operand is non-negative, then it's a cast @@ -216,10 +216,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToIntn) { +TEST (ConversionTestSuite, TestSafeUint64ToIntn) { RETURN_STATUS Status; - UINT64 Operand; - INTN Result; + UINT64 Operand; + INTN Result; =20 // // If Operand is <=3D MAX_INTN (0x7fff_ffff_ffff_ffff), then it's a cast @@ -238,10 +238,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToIntn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToUintn) { +TEST (ConversionTestSuite, TestSafeUint64ToUintn) { RETURN_STATUS Status; - UINT64 Operand; - UINTN Result; + UINT64 Operand; + UINTN Result; =20 // // UINTN is same as UINT64 in x64, so this is just a cast @@ -253,11 +253,11 @@ TEST(ConversionTestSuite, TestSafeUint64ToUintn) { ASSERT_EQ (0xababababefefefef, Result); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) { +TEST (AdditionSubtractionTestSuite, TestSafeUintnAdd) { RETURN_STATUS Status; - UINTN Augend; - UINTN Addend; - UINTN Result; + UINTN Augend; + UINTN Addend; + UINTN Result; =20 // // If the result of addition doesn't overflow MAX_UINTN, then it's addit= ion @@ -278,11 +278,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) { +TEST (AdditionSubtractionTestSuite, TestSafeIntnAdd) { RETURN_STATUS Status; - INTN Augend; - INTN Addend; - INTN Result; + INTN Augend; + INTN Addend; + INTN Result; =20 // // If the result of addition doesn't overflow MAX_INTN @@ -315,11 +315,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) { +TEST (AdditionSubtractionTestSuite, TestSafeUintnSub) { RETURN_STATUS Status; - UINTN Minuend; - UINTN Subtrahend; - UINTN Result; + UINTN Minuend; + UINTN Subtrahend; + UINTN Result; =20 // // If Minuend >=3D Subtrahend, then it's subtraction @@ -340,11 +340,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) { +TEST (AdditionSubtractionTestSuite, TestSafeIntnSub) { RETURN_STATUS Status; - INTN Minuend; - INTN Subtrahend; - INTN Result; + INTN Minuend; + INTN Subtrahend; + INTN Result; =20 // // If the result of subtractions doesn't overflow MAX_INTN or @@ -377,11 +377,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeUintnMult) { +TEST (MultiplicationTestSuite, TestSafeUintnMult) { RETURN_STATUS Status; - UINTN Multiplicand; - UINTN Multiplier; - UINTN Result; + UINTN Multiplicand; + UINTN Multiplier; + UINTN Result; =20 // // If the result of multiplication doesn't overflow MAX_UINTN, it will s= ucceed @@ -402,11 +402,11 @@ TEST(MultiplicationTestSuite, TestSafeUintnMult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeIntnMult) { +TEST (MultiplicationTestSuite, TestSafeIntnMult) { RETURN_STATUS Status; - INTN Multiplicand; - INTN Multiplier; - INTN Result; + INTN Multiplicand; + INTN Multiplier; + INTN Result; =20 // // If the result of multiplication doesn't overflow MAX_INTN and doesn't diff --git a/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/TestBaseSafeIntL= ib.cpp b/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.c= pp index 1fd51067a1f3..857ab4d1d36c 100644 --- a/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.cpp +++ b/MdePkg/Test/GoogleTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.cpp @@ -15,10 +15,10 @@ extern "C" { // // Conversion function tests: // -TEST(ConversionTestSuite, TestSafeInt8ToUint8) { +TEST (ConversionTestSuite, TestSafeInt8ToUint8) { RETURN_STATUS Status; - INT8 Operand; - UINT8 Result; + INT8 Operand; + UINT8 Result; =20 // // Positive UINT8 should result in just a cast @@ -37,10 +37,10 @@ TEST(ConversionTestSuite, TestSafeInt8ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt8ToUint16) { +TEST (ConversionTestSuite, TestSafeInt8ToUint16) { RETURN_STATUS Status; - INT8 Operand; - UINT16 Result; + INT8 Operand; + UINT16 Result; =20 // // Positive UINT8 should result in just a cast @@ -59,10 +59,10 @@ TEST(ConversionTestSuite, TestSafeInt8ToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt8ToUint32) { +TEST (ConversionTestSuite, TestSafeInt8ToUint32) { RETURN_STATUS Status; - INT8 Operand; - UINT32 Result; + INT8 Operand; + UINT32 Result; =20 // // Positive UINT8 should result in just a cast @@ -81,10 +81,10 @@ TEST(ConversionTestSuite, TestSafeInt8ToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt8ToUintn) { +TEST (ConversionTestSuite, TestSafeInt8ToUintn) { RETURN_STATUS Status; - INT8 Operand; - UINTN Result; + INT8 Operand; + UINTN Result; =20 // // Positive UINT8 should result in just a cast @@ -103,10 +103,10 @@ TEST(ConversionTestSuite, TestSafeInt8ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt8ToUint64) { +TEST (ConversionTestSuite, TestSafeInt8ToUint64) { RETURN_STATUS Status; - INT8 Operand; - UINT64 Result; + INT8 Operand; + UINT64 Result; =20 // // Positive UINT8 should result in just a cast @@ -125,10 +125,10 @@ TEST(ConversionTestSuite, TestSafeInt8ToUint64) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint8ToInt8) { +TEST (ConversionTestSuite, TestSafeUint8ToInt8) { RETURN_STATUS Status; - UINT8 Operand; - INT8 Result; + UINT8 Operand; + INT8 Result; =20 // // Operand <=3D 0x7F (MAX_INT8) should result in a cast @@ -147,10 +147,10 @@ TEST(ConversionTestSuite, TestSafeUint8ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint8ToChar8) { +TEST (ConversionTestSuite, TestSafeUint8ToChar8) { RETURN_STATUS Status; - UINT8 Operand; - CHAR8 Result; + UINT8 Operand; + CHAR8 Result; =20 // // CHAR8 is typedefed as char, which by default is signed, thus @@ -174,10 +174,10 @@ TEST(ConversionTestSuite, TestSafeUint8ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToInt8) { +TEST (ConversionTestSuite, TestSafeInt16ToInt8) { RETURN_STATUS Status; - INT16 Operand; - INT8 Result; + INT16 Operand; + INT8 Result; =20 // // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a ca= st @@ -205,10 +205,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToChar8) { +TEST (ConversionTestSuite, TestSafeInt16ToChar8) { RETURN_STATUS Status; - INT16 Operand; - CHAR8 Result; + INT16 Operand; + CHAR8 Result; =20 // // CHAR8 is typedefed as char, which may be signed or unsigned based @@ -252,10 +252,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToUint8) { +TEST (ConversionTestSuite, TestSafeInt16ToUint8) { RETURN_STATUS Status; - INT16 Operand; - UINT8 Result; + INT16 Operand; + UINT8 Result; =20 // // If Operand is between 0 and MAX_INT8 inclusive, then it's a cast @@ -278,10 +278,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToUint16) { +TEST (ConversionTestSuite, TestSafeInt16ToUint16) { RETURN_STATUS Status; - INT16 Operand =3D 0x5b5b; - UINT16 Result =3D 0; + INT16 Operand =3D 0x5b5b; + UINT16 Result =3D 0; =20 // // If Operand is non-negative, then it's a cast @@ -298,10 +298,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToUint32) { +TEST (ConversionTestSuite, TestSafeInt16ToUint32) { RETURN_STATUS Status; - INT16 Operand; - UINT32 Result; + INT16 Operand; + UINT32 Result; =20 // // If Operand is non-negative, then it's a cast @@ -320,10 +320,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToUintn) { +TEST (ConversionTestSuite, TestSafeInt16ToUintn) { RETURN_STATUS Status; - INT16 Operand; - UINTN Result; + INT16 Operand; + UINTN Result; =20 // // If Operand is non-negative, then it's a cast @@ -342,10 +342,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt16ToUint64) { +TEST (ConversionTestSuite, TestSafeInt16ToUint64) { RETURN_STATUS Status; - INT16 Operand; - UINT64 Result; + INT16 Operand; + UINT64 Result; =20 // // If Operand is non-negative, then it's a cast @@ -364,10 +364,10 @@ TEST(ConversionTestSuite, TestSafeInt16ToUint64) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint16ToInt8) { +TEST (ConversionTestSuite, TestSafeUint16ToInt8) { RETURN_STATUS Status; - UINT16 Operand; - INT8 Result; + UINT16 Operand; + INT8 Result; =20 // // If Operand is <=3D MAX_INT8, it's a cast @@ -386,10 +386,10 @@ TEST(ConversionTestSuite, TestSafeUint16ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint16ToChar8) { +TEST (ConversionTestSuite, TestSafeUint16ToChar8) { RETURN_STATUS Status; - UINT16 Operand; - CHAR8 Result; + UINT16 Operand; + CHAR8 Result; =20 // CHAR8 is typedefed as char, which by default is signed, thus // CHAR8 is same as INT8, so same tests as above: @@ -411,10 +411,10 @@ TEST(ConversionTestSuite, TestSafeUint16ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint16ToUint8) { +TEST (ConversionTestSuite, TestSafeUint16ToUint8) { RETURN_STATUS Status; - UINT16 Operand; - UINT8 Result; + UINT16 Operand; + UINT8 Result; =20 // // If Operand is <=3D MAX_UINT8 (0xff), it's a cast @@ -433,10 +433,10 @@ TEST(ConversionTestSuite, TestSafeUint16ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint16ToInt16) { +TEST (ConversionTestSuite, TestSafeUint16ToInt16) { RETURN_STATUS Status; - UINT16 Operand; - INT16 Result; + UINT16 Operand; + INT16 Result; =20 // // If Operand is <=3D MAX_INT16 (0x7fff), it's a cast @@ -455,10 +455,10 @@ TEST(ConversionTestSuite, TestSafeUint16ToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToInt8) { +TEST (ConversionTestSuite, TestSafeInt32ToInt8) { RETURN_STATUS Status; - INT32 Operand; - INT8 Result; + INT32 Operand; + INT8 Result; =20 // // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a ca= st @@ -486,10 +486,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToChar8) { +TEST (ConversionTestSuite, TestSafeInt32ToChar8) { RETURN_STATUS Status; - INT32 Operand; - CHAR8 Result; + INT32 Operand; + CHAR8 Result; =20 // // CHAR8 is typedefed as char, which may be signed or unsigned based @@ -533,10 +533,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToUint8) { +TEST (ConversionTestSuite, TestSafeInt32ToUint8) { RETURN_STATUS Status; - INT32 Operand; - UINT8 Result; + INT32 Operand; + UINT8 Result; =20 // // If Operand is between 0 and MAX_INT8 inclusive, then it's a cast @@ -563,10 +563,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToInt16) { +TEST (ConversionTestSuite, TestSafeInt32ToInt16) { RETURN_STATUS Status; - INT32 Operand; - INT16 Result; + INT32 Operand; + INT16 Result; =20 // // If Operand is between MIN_INT16 and MAX_INT16 inclusive, then it's a = cast @@ -594,10 +594,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToUint16) { +TEST (ConversionTestSuite, TestSafeInt32ToUint16) { RETURN_STATUS Status; - INT32 Operand; - UINT16 Result; + INT32 Operand; + UINT16 Result; =20 // // If Operand is between 0 and MAX_UINT16 inclusive, then it's a cast @@ -624,10 +624,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToUint32) { +TEST (ConversionTestSuite, TestSafeInt32ToUint32) { RETURN_STATUS Status; - INT32 Operand; - UINT32 Result; + INT32 Operand; + UINT32 Result; =20 // // If Operand is non-negative, then it's a cast @@ -646,10 +646,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt32ToUint64) { +TEST (ConversionTestSuite, TestSafeInt32ToUint64) { RETURN_STATUS Status; - INT32 Operand; - UINT64 Result; + INT32 Operand; + UINT64 Result; =20 // // If Operand is non-negative, then it's a cast @@ -668,10 +668,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUint64) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToInt8) { +TEST (ConversionTestSuite, TestSafeUint32ToInt8) { RETURN_STATUS Status; - UINT32 Operand; - INT8 Result; + UINT32 Operand; + INT8 Result; =20 // // If Operand is <=3D MAX_INT8, then it's a cast @@ -690,10 +690,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToChar8) { +TEST (ConversionTestSuite, TestSafeUint32ToChar8) { RETURN_STATUS Status; - UINT32 Operand; - CHAR8 Result; + UINT32 Operand; + CHAR8 Result; =20 // CHAR8 is typedefed as char, which by default is signed, thus // CHAR8 is same as INT8, so same tests as above: @@ -715,10 +715,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToUint8) { +TEST (ConversionTestSuite, TestSafeUint32ToUint8) { RETURN_STATUS Status; - UINT32 Operand; - UINT8 Result; + UINT32 Operand; + UINT8 Result; =20 // // If Operand is <=3D MAX_UINT8, then it's a cast @@ -737,10 +737,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToInt16) { +TEST (ConversionTestSuite, TestSafeUint32ToInt16) { RETURN_STATUS Status; - UINT32 Operand; - INT16 Result; + UINT32 Operand; + INT16 Result; =20 // // If Operand is <=3D MAX_INT16, then it's a cast @@ -759,10 +759,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToUint16) { +TEST (ConversionTestSuite, TestSafeUint32ToUint16) { RETURN_STATUS Status; - UINT32 Operand; - UINT16 Result; + UINT32 Operand; + UINT16 Result; =20 // // If Operand is <=3D MAX_UINT16, then it's a cast @@ -781,10 +781,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint32ToInt32) { +TEST (ConversionTestSuite, TestSafeUint32ToInt32) { RETURN_STATUS Status; - UINT32 Operand; - INT32 Result; + UINT32 Operand; + INT32 Result; =20 // // If Operand is <=3D MAX_INT32, then it's a cast @@ -803,10 +803,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToInt32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToInt8) { +TEST (ConversionTestSuite, TestSafeIntnToInt8) { RETURN_STATUS Status; - INTN Operand; - INT8 Result; + INTN Operand; + INT8 Result; =20 // // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a ca= st @@ -834,10 +834,10 @@ TEST(ConversionTestSuite, TestSafeIntnToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToChar8) { +TEST (ConversionTestSuite, TestSafeIntnToChar8) { RETURN_STATUS Status; - INTN Operand; - CHAR8 Result; + INTN Operand; + CHAR8 Result; =20 // // CHAR8 is typedefed as char, which may be signed or unsigned based @@ -881,10 +881,10 @@ TEST(ConversionTestSuite, TestSafeIntnToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToUint8) { +TEST (ConversionTestSuite, TestSafeIntnToUint8) { RETURN_STATUS Status; - INTN Operand; - UINT8 Result; + INTN Operand; + UINT8 Result; =20 // // If Operand is between 0 and MAX_UINT8 inclusive, then it's a cast @@ -907,10 +907,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToInt16) { +TEST (ConversionTestSuite, TestSafeIntnToInt16) { RETURN_STATUS Status; - INTN Operand; - INT16 Result; + INTN Operand; + INT16 Result; =20 // // If Operand is between MIN_INT16 and MAX_INT16 inclusive, then it's a = cast @@ -938,10 +938,10 @@ TEST(ConversionTestSuite, TestSafeIntnToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToUint16) { +TEST (ConversionTestSuite, TestSafeIntnToUint16) { RETURN_STATUS Status; - INTN Operand; - UINT16 Result; + INTN Operand; + UINT16 Result; =20 // // If Operand is between 0 and MAX_UINT16 inclusive, then it's a cast @@ -964,10 +964,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToUintn) { +TEST (ConversionTestSuite, TestSafeIntnToUintn) { RETURN_STATUS Status; - INTN Operand; - UINTN Result; + INTN Operand; + UINTN Result; =20 // // If Operand is non-negative, then it's a cast @@ -986,10 +986,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUintn) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeIntnToUint64) { +TEST (ConversionTestSuite, TestSafeIntnToUint64) { RETURN_STATUS Status; - INTN Operand; - UINT64 Result; + INTN Operand; + UINT64 Result; =20 // // If Operand is non-negative, then it's a cast @@ -1008,10 +1008,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint64) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToInt8) { +TEST (ConversionTestSuite, TestSafeUintnToInt8) { RETURN_STATUS Status; - UINTN Operand; - INT8 Result; + UINTN Operand; + INT8 Result; =20 // // If Operand is <=3D MAX_INT8, then it's a cast @@ -1030,10 +1030,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToChar8) { +TEST (ConversionTestSuite, TestSafeUintnToChar8) { RETURN_STATUS Status; - UINTN Operand; - CHAR8 Result; + UINTN Operand; + CHAR8 Result; =20 // CHAR8 is typedefed as char, which by default is signed, thus // CHAR8 is same as INT8, so same tests as above: @@ -1055,10 +1055,10 @@ TEST(ConversionTestSuite, TestSafeUintnToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToUint8) { +TEST (ConversionTestSuite, TestSafeUintnToUint8) { RETURN_STATUS Status; - UINTN Operand; - UINT8 Result; + UINTN Operand; + UINT8 Result; =20 // // If Operand is <=3D MAX_UINT8, then it's a cast @@ -1077,10 +1077,10 @@ TEST(ConversionTestSuite, TestSafeUintnToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToInt16) { +TEST (ConversionTestSuite, TestSafeUintnToInt16) { RETURN_STATUS Status; - UINTN Operand; - INT16 Result; + UINTN Operand; + INT16 Result; =20 // // If Operand is <=3D MAX_INT16, then it's a cast @@ -1099,10 +1099,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToUint16) { +TEST (ConversionTestSuite, TestSafeUintnToUint16) { RETURN_STATUS Status; - UINTN Operand; - UINT16 Result; + UINTN Operand; + UINT16 Result; =20 // // If Operand is <=3D MAX_UINT16, then it's a cast @@ -1121,10 +1121,10 @@ TEST(ConversionTestSuite, TestSafeUintnToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUintnToInt32) { +TEST (ConversionTestSuite, TestSafeUintnToInt32) { RETURN_STATUS Status; - UINTN Operand; - INT32 Result; + UINTN Operand; + INT32 Result; =20 // // If Operand is <=3D MAX_INT32, then it's a cast @@ -1143,10 +1143,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToInt8) { +TEST (ConversionTestSuite, TestSafeInt64ToInt8) { RETURN_STATUS Status; - INT64 Operand; - INT8 Result; + INT64 Operand; + INT8 Result; =20 // // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a c= ast @@ -1174,10 +1174,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToChar8) { +TEST (ConversionTestSuite, TestSafeInt64ToChar8) { RETURN_STATUS Status; - INT64 Operand; - CHAR8 Result; + INT64 Operand; + CHAR8 Result; =20 // // CHAR8 is typedefed as char, which may be signed or unsigned based @@ -1221,10 +1221,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToUint8) { +TEST (ConversionTestSuite, TestSafeInt64ToUint8) { RETURN_STATUS Status; - INT64 Operand; - UINT8 Result; + INT64 Operand; + UINT8 Result; =20 // // If Operand is between 0 and MAX_UINT8 inclusive, then it's a cast @@ -1247,10 +1247,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToInt16) { +TEST (ConversionTestSuite, TestSafeInt64ToInt16) { RETURN_STATUS Status; - INT64 Operand; - INT16 Result; + INT64 Operand; + INT16 Result; =20 // // If Operand is between MIN_INT16 and MAX_INT16 inclusive, then it's a= cast @@ -1278,10 +1278,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToUint16) { +TEST (ConversionTestSuite, TestSafeInt64ToUint16) { RETURN_STATUS Status; - INT64 Operand; - UINT16 Result; + INT64 Operand; + UINT16 Result; =20 // // If Operand is between 0 and MAX_UINT16 inclusive, then it's a cast @@ -1304,10 +1304,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToInt32) { +TEST (ConversionTestSuite, TestSafeInt64ToInt32) { RETURN_STATUS Status; - INT64 Operand; - INT32 Result; + INT64 Operand; + INT32 Result; =20 // // If Operand is between MIN_INT32 and MAX_INT32 inclusive, then it's a= cast @@ -1335,10 +1335,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToInt32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToUint32) { +TEST (ConversionTestSuite, TestSafeInt64ToUint32) { RETURN_STATUS Status; - INT64 Operand; - UINT32 Result; + INT64 Operand; + UINT32 Result; =20 // // If Operand is between 0 and MAX_UINT32 inclusive, then it's a cast @@ -1361,10 +1361,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeInt64ToUint64) { +TEST (ConversionTestSuite, TestSafeInt64ToUint64) { RETURN_STATUS Status; - INT64 Operand; - UINT64 Result; + INT64 Operand; + UINT64 Result; =20 // // If Operand is non-negative, then it's a cast @@ -1383,10 +1383,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUint64) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToInt8) { +TEST (ConversionTestSuite, TestSafeUint64ToInt8) { RETURN_STATUS Status; - UINT64 Operand; - INT8 Result; + UINT64 Operand; + INT8 Result; =20 // // If Operand is <=3D MAX_INT8, then it's a cast @@ -1405,10 +1405,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToInt8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToChar8) { +TEST (ConversionTestSuite, TestSafeUint64ToChar8) { RETURN_STATUS Status; - UINT64 Operand; - CHAR8 Result; + UINT64 Operand; + CHAR8 Result; =20 // CHAR8 is typedefed as char, which by default is signed, thus // CHAR8 is same as INT8, so same tests as above: @@ -1430,10 +1430,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToChar8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToUint8) { +TEST (ConversionTestSuite, TestSafeUint64ToUint8) { RETURN_STATUS Status; - UINT64 Operand; - UINT8 Result; + UINT64 Operand; + UINT8 Result; =20 // // If Operand is <=3D MAX_UINT8, then it's a cast @@ -1452,10 +1452,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToUint8) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToInt16) { +TEST (ConversionTestSuite, TestSafeUint64ToInt16) { RETURN_STATUS Status; - UINT64 Operand; - INT16 Result; + UINT64 Operand; + INT16 Result; =20 // // If Operand is <=3D MAX_INT16, then it's a cast @@ -1474,10 +1474,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToInt16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToUint16) { +TEST (ConversionTestSuite, TestSafeUint64ToUint16) { RETURN_STATUS Status; - UINT64 Operand; - UINT16 Result; + UINT64 Operand; + UINT16 Result; =20 // // If Operand is <=3D MAX_UINT16, then it's a cast @@ -1496,10 +1496,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToUint16) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToInt32) { +TEST (ConversionTestSuite, TestSafeUint64ToInt32) { RETURN_STATUS Status; - UINT64 Operand; - INT32 Result; + UINT64 Operand; + INT32 Result; =20 // // If Operand is <=3D MAX_INT32, then it's a cast @@ -1518,10 +1518,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToInt32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToUint32) { +TEST (ConversionTestSuite, TestSafeUint64ToUint32) { RETURN_STATUS Status; - UINT64 Operand; - UINT32 Result; + UINT64 Operand; + UINT32 Result; =20 // // If Operand is <=3D MAX_UINT32, then it's a cast @@ -1540,10 +1540,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToUint32) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(ConversionTestSuite, TestSafeUint64ToInt64) { +TEST (ConversionTestSuite, TestSafeUint64ToInt64) { RETURN_STATUS Status; - UINT64 Operand; - INT64 Result; + UINT64 Operand; + INT64 Result; =20 // // If Operand is <=3D MAX_INT64, then it's a cast @@ -1565,11 +1565,11 @@ TEST(ConversionTestSuite, TestSafeUint64ToInt64) { // // Addition function tests: // -TEST(AdditionSubtractionTestSuite, TestSafeUint8Add) { +TEST (AdditionSubtractionTestSuite, TestSafeUint8Add) { RETURN_STATUS Status; - UINT8 Augend; - UINT8 Addend; - UINT8 Result; + UINT8 Augend; + UINT8 Addend; + UINT8 Result; =20 // // If the result of addition doesn't overflow MAX_UINT8, then it's addit= ion @@ -1590,11 +1590,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint8Add= ) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUint16Add) { +TEST (AdditionSubtractionTestSuite, TestSafeUint16Add) { RETURN_STATUS Status; - UINT16 Augend =3D 0x3a3a; - UINT16 Addend =3D 0x3a3a; - UINT16 Result =3D 0; + UINT16 Augend =3D 0x3a3a; + UINT16 Addend =3D 0x3a3a; + UINT16 Result =3D 0; =20 // // If the result of addition doesn't overflow MAX_UINT16, then it's addi= tion @@ -1612,11 +1612,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint16Ad= d) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUint32Add) { +TEST (AdditionSubtractionTestSuite, TestSafeUint32Add) { RETURN_STATUS Status; - UINT32 Augend; - UINT32 Addend; - UINT32 Result; + UINT32 Augend; + UINT32 Addend; + UINT32 Result; =20 // // If the result of addition doesn't overflow MAX_UINT32, then it's addi= tion @@ -1637,11 +1637,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint32Ad= d) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUint64Add) { +TEST (AdditionSubtractionTestSuite, TestSafeUint64Add) { RETURN_STATUS Status; - UINT64 Augend; - UINT64 Addend; - UINT64 Result; + UINT64 Augend; + UINT64 Addend; + UINT64 Result; =20 // // If the result of addition doesn't overflow MAX_UINT64, then it's addi= tion @@ -1662,11 +1662,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint64Ad= d) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt8Add) { +TEST (AdditionSubtractionTestSuite, TestSafeInt8Add) { RETURN_STATUS Status; - INT8 Augend; - INT8 Addend; - INT8 Result; + INT8 Augend; + INT8 Addend; + INT8 Result; =20 // // If the result of addition doesn't overflow MAX_INT8 @@ -1699,11 +1699,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt8Add)= { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt16Add) { +TEST (AdditionSubtractionTestSuite, TestSafeInt16Add) { RETURN_STATUS Status; - INT16 Augend; - INT16 Addend; - INT16 Result; + INT16 Augend; + INT16 Addend; + INT16 Result; =20 // // If the result of addition doesn't overflow MAX_INT16 @@ -1736,11 +1736,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt16Add= ) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt32Add) { +TEST (AdditionSubtractionTestSuite, TestSafeInt32Add) { RETURN_STATUS Status; - INT32 Augend; - INT32 Addend; - INT32 Result; + INT32 Augend; + INT32 Addend; + INT32 Result; =20 // // If the result of addition doesn't overflow MAX_INT32 @@ -1773,11 +1773,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt32Add= ) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt64Add) { +TEST (AdditionSubtractionTestSuite, TestSafeInt64Add) { RETURN_STATUS Status; - INT64 Augend; - INT64 Addend; - INT64 Result; + INT64 Augend; + INT64 Addend; + INT64 Result; =20 // // If the result of addition doesn't overflow MAX_INT64 @@ -1813,11 +1813,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt64Add= ) { // // Subtraction function tests: // -TEST(AdditionSubtractionTestSuite, TestSafeUint8Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeUint8Sub) { RETURN_STATUS Status; - UINT8 Minuend; - UINT8 Subtrahend; - UINT8 Result; + UINT8 Minuend; + UINT8 Subtrahend; + UINT8 Result; =20 // // If Minuend >=3D Subtrahend, then it's subtraction @@ -1838,11 +1838,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint8Sub= ) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUint16Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeUint16Sub) { RETURN_STATUS Status; - UINT16 Minuend; - UINT16 Subtrahend; - UINT16 Result; + UINT16 Minuend; + UINT16 Subtrahend; + UINT16 Result; =20 // // If Minuend >=3D Subtrahend, then it's subtraction @@ -1863,11 +1863,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint16Su= b) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUint32Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeUint32Sub) { RETURN_STATUS Status; - UINT32 Minuend; - UINT32 Subtrahend; - UINT32 Result; + UINT32 Minuend; + UINT32 Subtrahend; + UINT32 Result; =20 // // If Minuend >=3D Subtrahend, then it's subtraction @@ -1888,11 +1888,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint32Su= b) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeUint64Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeUint64Sub) { RETURN_STATUS Status; - UINT64 Minuend; - UINT64 Subtrahend; - UINT64 Result; + UINT64 Minuend; + UINT64 Subtrahend; + UINT64 Result; =20 // // If Minuend >=3D Subtrahend, then it's subtraction @@ -1913,11 +1913,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUint64Su= b) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt8Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeInt8Sub) { RETURN_STATUS Status; - INT8 Minuend; - INT8 Subtrahend; - INT8 Result; + INT8 Minuend; + INT8 Subtrahend; + INT8 Result; =20 // // If the result of subtractions doesn't overflow MAX_INT8 or @@ -1950,11 +1950,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt8Sub)= { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt16Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeInt16Sub) { RETURN_STATUS Status; - INT16 Minuend; - INT16 Subtrahend; - INT16 Result; + INT16 Minuend; + INT16 Subtrahend; + INT16 Result; =20 // // If the result of subtractions doesn't overflow MAX_INT16 or @@ -1987,11 +1987,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt16Sub= ) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt32Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeInt32Sub) { RETURN_STATUS Status; - INT32 Minuend; - INT32 Subtrahend; - INT32 Result; + INT32 Minuend; + INT32 Subtrahend; + INT32 Result; =20 // // If the result of subtractions doesn't overflow MAX_INT32 or @@ -2024,11 +2024,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt32Sub= ) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(AdditionSubtractionTestSuite, TestSafeInt64Sub) { +TEST (AdditionSubtractionTestSuite, TestSafeInt64Sub) { RETURN_STATUS Status; - INT64 Minuend; - INT64 Subtrahend; - INT64 Result; + INT64 Minuend; + INT64 Subtrahend; + INT64 Result; =20 // // If the result of subtractions doesn't overflow MAX_INT64 or @@ -2064,11 +2064,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeInt64Sub= ) { // // Multiplication function tests: // -TEST(MultiplicationTestSuite, TestSafeUint8Mult) { +TEST (MultiplicationTestSuite, TestSafeUint8Mult) { RETURN_STATUS Status; - UINT8 Multiplicand; - UINT8 Multiplier; - UINT8 Result; + UINT8 Multiplicand; + UINT8 Multiplier; + UINT8 Result; =20 // // If the result of multiplication doesn't overflow MAX_UINT8, it will s= ucceed @@ -2089,11 +2089,11 @@ TEST(MultiplicationTestSuite, TestSafeUint8Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeUint16Mult) { +TEST (MultiplicationTestSuite, TestSafeUint16Mult) { RETURN_STATUS Status; - UINT16 Multiplicand; - UINT16 Multiplier; - UINT16 Result; + UINT16 Multiplicand; + UINT16 Multiplier; + UINT16 Result; =20 // // If the result of multiplication doesn't overflow MAX_UINT16, it will = succeed @@ -2114,11 +2114,11 @@ TEST(MultiplicationTestSuite, TestSafeUint16Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeUint32Mult) { +TEST (MultiplicationTestSuite, TestSafeUint32Mult) { RETURN_STATUS Status; - UINT32 Multiplicand; - UINT32 Multiplier; - UINT32 Result; + UINT32 Multiplicand; + UINT32 Multiplier; + UINT32 Result; =20 // // If the result of multiplication doesn't overflow MAX_UINT32, it will = succeed @@ -2139,11 +2139,11 @@ TEST(MultiplicationTestSuite, TestSafeUint32Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeUint64Mult) { +TEST (MultiplicationTestSuite, TestSafeUint64Mult) { RETURN_STATUS Status; - UINT64 Multiplicand; - UINT64 Multiplier; - UINT64 Result; + UINT64 Multiplicand; + UINT64 Multiplier; + UINT64 Result; =20 // // If the result of multiplication doesn't overflow MAX_UINT64, it will = succeed @@ -2164,11 +2164,11 @@ TEST(MultiplicationTestSuite, TestSafeUint64Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeInt8Mult) { +TEST (MultiplicationTestSuite, TestSafeInt8Mult) { RETURN_STATUS Status; - INT8 Multiplicand; - INT8 Multiplier; - INT8 Result; + INT8 Multiplicand; + INT8 Multiplier; + INT8 Result; =20 // // If the result of multiplication doesn't overflow MAX_INT8 and doesn't @@ -2190,11 +2190,11 @@ TEST(MultiplicationTestSuite, TestSafeInt8Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeInt16Mult) { +TEST (MultiplicationTestSuite, TestSafeInt16Mult) { RETURN_STATUS Status; - INT16 Multiplicand; - INT16 Multiplier; - INT16 Result; + INT16 Multiplicand; + INT16 Multiplier; + INT16 Result; =20 // // If the result of multiplication doesn't overflow MAX_INT16 and doesn't @@ -2216,11 +2216,11 @@ TEST(MultiplicationTestSuite, TestSafeInt16Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeInt32Mult) { +TEST (MultiplicationTestSuite, TestSafeInt32Mult) { RETURN_STATUS Status; - INT32 Multiplicand; - INT32 Multiplier; - INT32 Result; + INT32 Multiplicand; + INT32 Multiplier; + INT32 Result; =20 // // If the result of multiplication doesn't overflow MAX_INT32 and doesn't @@ -2242,11 +2242,11 @@ TEST(MultiplicationTestSuite, TestSafeInt32Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -TEST(MultiplicationTestSuite, TestSafeInt64Mult) { +TEST (MultiplicationTestSuite, TestSafeInt64Mult) { RETURN_STATUS Status; - INT64 Multiplicand; - INT64 Multiplier; - INT64 Result; + INT64 Multiplicand; + INT64 Multiplier; + INT64 Result; =20 // // If the result of multiplication doesn't overflow MAX_INT64 and doesn't @@ -2268,7 +2268,12 @@ TEST(MultiplicationTestSuite, TestSafeInt64Mult) { ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status); } =20 -int main(int argc, char* argv[]) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); +int +main ( + int argc, + char *argv[] + ) +{ + testing::InitGoogleTest (&argc, argv); + return RUN_ALL_TESTS (); } diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockHobLib.h b/Mde= Pkg/Test/Mock/Include/GoogleTest/Library/MockHobLib.h index 994b8133e5d0..586b479ea5d2 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockHobLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockHobLib.h @@ -11,9 +11,9 @@ #include #include extern "C" { -#include -#include -#include + #include + #include + #include } =20 struct MockHobLib { diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockPeiServicesLib= .h b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockPeiServicesLib.h index 4a99fec539c0..6a6424d7c6fc 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockPeiServicesLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockPeiServicesLib.h @@ -11,9 +11,9 @@ #include #include extern "C" { -#include -#include -#include + #include + #include + #include } =20 struct MockPeiServicesLib { diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h b/Md= ePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h index dec2c93e1b34..93697da9cf86 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiLib.h @@ -11,8 +11,8 @@ #include #include extern "C" { -#include -#include + #include + #include } =20 struct MockUefiLib { diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeSer= vicesTableLib.h b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRunti= meServicesTableLib.h index afdfc6b85597..241abc55c079 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeServicesTa= bleLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeServicesTa= bleLib.h @@ -11,8 +11,8 @@ #include #include extern "C" { -#include -#include + #include + #include } =20 struct MockUefiRuntimeServicesTableLib { diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.cpp = b/MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.cpp index 5a5a9159fcfe..51ee09065e92 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.cpp @@ -7,24 +7,24 @@ =20 #include =20 -MOCK_INTERFACE_DEFINITION(MockHobLib); +MOCK_INTERFACE_DEFINITION (MockHobLib); =20 -MOCK_FUNCTION_DEFINITION(MockHobLib, GetHobList, 0, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, GetNextHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, GetFirstHob, 1, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, GetNextGuidHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, GetFirstGuidHob, 1, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, GetBootModeHob, 0, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildModuleHob, 4, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildResourceDescriptorWithOwnerHob, = 5, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildResourceDescriptorHob, 4, EFIAPI= ); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildGuidHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildGuidDataHob, 3, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildFvHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildFv2Hob, 4, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildFv3Hob, 6, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildCvHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildCpuHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildStackHob, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildBspStoreHob, 3, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockHobLib, BuildMemoryAllocationHob, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, GetHobList, 0, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, GetNextHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, GetFirstHob, 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, GetNextGuidHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, GetFirstGuidHob, 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, GetBootModeHob, 0, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildModuleHob, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildResourceDescriptorWithOwnerHob,= 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildResourceDescriptorHob, 4, EFIAP= I); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildGuidHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildGuidDataHob, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildFvHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildFv2Hob, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildFv3Hob, 6, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildCvHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildCpuHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildStackHob, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildBspStoreHob, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockHobLib, BuildMemoryAllocationHob, 3, EFIAPI); diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/MockPei= ServicesLib.cpp b/MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/Mo= ckPeiServicesLib.cpp index 9a7ff4bd8ffb..c6035bd664cf 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/MockPeiService= sLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/MockPeiService= sLib.cpp @@ -7,30 +7,30 @@ =20 #include =20 -MOCK_INTERFACE_DEFINITION(MockPeiServicesLib); +MOCK_INTERFACE_DEFINITION (MockPeiServicesLib); =20 -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallPpi, 1, EFI= API); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesReInstallPpi, 2, E= FIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesLocatePpi, 4, EFIA= PI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesNotifyPpi, 1, EFIA= PI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesGetBootMode, 1, EF= IAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesSetBootMode, 1, EF= IAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesGetHobList, 1, EFI= API); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesCreateHob, 3, EFIA= PI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindNextVolume,= 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindNextFile, 3= , EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindSectionData= , 3, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindSectionData= 3, 5, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallPeiMemory, = 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesAllocatePages, 3, = EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFreePages, 2, EFIA= PI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesAllocatePool, 2, E= FIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesResetSystem, 0, EF= IAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindFileByName,= 3, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsGetFileInfo, 2,= EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsGetFileInfo2, 2= , EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsGetVolumeInfo, = 2, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesRegisterForShadow,= 1, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallFvInfoPpi, = 5, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallFvInfo2Ppi,= 6, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesResetSystem2, 4, E= FIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallPpi, 1, EF= IAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesReInstallPpi, 2, = EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesLocatePpi, 4, EFI= API); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesNotifyPpi, 1, EFI= API); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesGetBootMode, 1, E= FIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesSetBootMode, 1, E= FIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesGetHobList, 1, EF= IAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesCreateHob, 3, EFI= API); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindNextVolume= , 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindNextFile, = 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindSectionDat= a, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindSectionDat= a3, 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallPeiMemory,= 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesAllocatePages, 3,= EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFreePages, 2, EFI= API); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesAllocatePool, 2, = EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesResetSystem, 0, E= FIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindFileByName= , 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsGetFileInfo, 2= , EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsGetFileInfo2, = 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsGetVolumeInfo,= 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesRegisterForShadow= , 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallFvInfoPpi,= 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallFvInfo2Ppi= , 6, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesResetSystem2, 4, = EFIAPI); diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cp= p b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp index 5339d040c999..2a0c9613eaa2 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiLib/MockUefiLib.cpp @@ -6,7 +6,7 @@ **/ #include =20 -MOCK_INTERFACE_DEFINITION(MockUefiLib); +MOCK_INTERFACE_DEFINITION (MockUefiLib); =20 -MOCK_FUNCTION_DEFINITION(MockUefiLib, GetVariable2, 4, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockUefiLib, GetEfiGlobalVariable2, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockUefiLib, GetVariable2, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockUefiLib, GetEfiGlobalVariable2, 3, EFIAPI); diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTab= leLib/MockUefiRuntimeServicesTableLib.cpp b/MdePkg/Test/Mock/Library/Google= Test/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.cpp index ecd1ba82366c..14296b0ccb88 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/M= ockUefiRuntimeServicesTableLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/M= ockUefiRuntimeServicesTableLib.cpp @@ -6,13 +6,13 @@ **/ #include =20 -MOCK_INTERFACE_DEFINITION(MockUefiRuntimeServicesTableLib); +MOCK_INTERFACE_DEFINITION (MockUefiRuntimeServicesTableLib); =20 -MOCK_FUNCTION_DEFINITION(MockUefiRuntimeServicesTableLib, gRT_GetVariable,= 5, EFIAPI); -MOCK_FUNCTION_DEFINITION(MockUefiRuntimeServicesTableLib, gRT_SetVariable,= 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetVariable= , 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_SetVariable= , 5, EFIAPI); =20 -static EFI_RUNTIME_SERVICES localRt =3D { - {0}, // EFI_TABLE_HEADER +static EFI_RUNTIME_SERVICES localRt =3D { + { 0 }, // EFI_TABLE_HEADER =20 NULL, // EFI_GET_TIME NULL, // EFI_SET_TIME @@ -36,5 +36,5 @@ static EFI_RUNTIME_SERVICES localRt =3D { }; =20 extern "C" { - EFI_RUNTIME_SERVICES* gRT =3D &localRt; + EFI_RUNTIME_SERVICES *gRT =3D &localRt; } --=20 2.41.0.windows.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107669): https://edk2.groups.io/g/devel/message/107669 Mute This Topic: https://groups.io/mt/100655292/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107670+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107670+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627044; cv=none; d=zohomail.com; s=zohoarc; b=Tim0v5CEvDr0FSWxDMCIEfrAECnq2UVAT1pFWTBW3dAl9SoSO05fiFDVn3W68pOR4wTmcx2+NGkPDYInCrN8nqBsC+3/Kt4BTY4a37ptwE1TGDdxnvpRDZ3UMdhU6BrmQ5nNoT0GwUQAh9BDeVtJBPWqTiaKtV9PHnYZ57HSl/w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627044; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=bcyc9DpLffwGqHLAfZv39d6umq8ZFFMjlyvseeJKWKg=; b=RBXCSKLRZcUE4rLtqvr29/kKKxPxb4jUDPHthrqs5dS9MAbFeO/m9s9L9Naxw7hsAz+arMHzRFt/7xPESLjI4LbBCZHRFaIwdBSv7A8qcvFxbDLB1LSrNvvMscmlk1qVl+Ie7K6OxyqJFDVdzy0bpjbRghwwOpMo3WehByMlu50= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107670+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1691627044684511.53860155448115; Wed, 9 Aug 2023 17:24:04 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Nq26lzGnvEHNS8a4sGTgoBkzHNXpfC6xNdlBP6ajFSI=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627044; v=1; b=qQJlMxw6LGZy8aQiG2T3gG3y+OYJjc4kMoQ674B6egMwbw/jUVmd9c4hnRUI0U9bf7L54Sy1 O/wj2mOTkYdYnrwkn0Au6UcLR2DszPdZ/Cf4fkDxiSZMHsWgcYry3x6YC0yhiNwdhR2eyCRlm9C bhTcVPMWTkgOWVbQXtqjttqg= X-Received: by 127.0.0.2 with SMTP id ROUqYY1788612xoVnmRRkEBY; Wed, 09 Aug 2023 17:24:04 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.3575.1691616749793367680 for ; Wed, 09 Aug 2023 14:32:29 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id 7FC7720FC4C7 for ; Wed, 9 Aug 2023 14:32:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7FC7720FC4C7 From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 5/7] SecurityPkg: Apply uncrustify formatting to relevant files Date: Wed, 9 Aug 2023 14:32:24 -0700 Message-ID: <20230809213226.1387-6-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: J4TTyzeNzuHTTKrABOeDjRy7x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627046198100029 Content-Type: text/plain; charset="utf-8" Apply uncrustify formatting to GoogleTest cpp and header files. CC: Jiewen Yao =20 CC: Jian J Wang Signed-off-by: Vivian Nowka-Keane --- SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariableLib= GoogleTest.cpp | 205 ++++++++++++-------- SecurityPkg/Test/Mock/Include/GoogleTest/Library/MockPlatformPKProtectionL= ib.h | 4 +- SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/MockP= latformPKProtectionLib.cpp | 4 +- 3 files changed, 124 insertions(+), 89 deletions(-) diff --git a/SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBoo= tVariableLibGoogleTest.cpp b/SecurityPkg/Library/SecureBootVariableLib/Goog= leTest/SecureBootVariableLibGoogleTest.cpp index c9190c8ffd61..f66c595a97a8 100644 --- a/SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariab= leLibGoogleTest.cpp +++ b/SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariab= leLibGoogleTest.cpp @@ -21,154 +21,189 @@ using namespace testing; =20 //////////////////////////////////////////////////////////////////////////= //// class SetSecureBootModeTest : public Test { - protected: - MockUefiRuntimeServicesTableLib RtServicesMock; - UINT8 SecureBootMode; - EFI_STATUS Status; +protected: + MockUefiRuntimeServicesTableLib RtServicesMock; + UINT8 SecureBootMode; + EFI_STATUS Status; =20 - void SetUp() override { - // Any random magic number can be used for these tests - SecureBootMode =3D 0xAB; - } + void + SetUp ( + ) override + { + // Any random magic number can be used for these tests + SecureBootMode =3D 0xAB; + } }; =20 // Test SetSecureBootMode() API from SecureBootVariableLib to verify the // expected error is returned when the call to gRT->SetVariable() fails. -TEST_F(SetSecureBootModeTest, SetVarError) { - EXPECT_CALL(RtServicesMock, gRT_SetVariable) - .WillOnce(Return(EFI_INVALID_PARAMETER)); +TEST_F (SetSecureBootModeTest, SetVarError) { + EXPECT_CALL (RtServicesMock, gRT_SetVariable) + .WillOnce (Return (EFI_INVALID_PARAMETER)); =20 - Status =3D SetSecureBootMode(SecureBootMode); - EXPECT_EQ(Status, EFI_INVALID_PARAMETER); + Status =3D SetSecureBootMode (SecureBootMode); + EXPECT_EQ (Status, EFI_INVALID_PARAMETER); } =20 // Test SetSecureBootMode() API from SecureBootVariableLib to verify the // expected secure boot mode is written to the correct variable in the call // to gRT->SetVariable(). -TEST_F(SetSecureBootModeTest, PropogateModeToSetVar) { - EXPECT_CALL(RtServicesMock, - gRT_SetVariable( - Char16StrEq(EFI_CUSTOM_MODE_NAME), - BufferEq(&gEfiCustomModeEnableGuid, sizeof(EFI_GUID)), +TEST_F (SetSecureBootModeTest, PropogateModeToSetVar) { + EXPECT_CALL ( + RtServicesMock, + gRT_SetVariable ( + Char16StrEq (EFI_CUSTOM_MODE_NAME), + BufferEq (&gEfiCustomModeEnableGuid, sizeof (EFI_GUID)), EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, - sizeof(SecureBootMode), - BufferEq(&SecureBootMode, sizeof(SecureBootMode)))) - .WillOnce(Return(EFI_SUCCESS)); + sizeof (SecureBootMode), + BufferEq (&SecureBootMode, sizeof (SecureBootMode)) + ) + ) + .WillOnce (Return (EFI_SUCCESS)); =20 - Status =3D SetSecureBootMode(SecureBootMode); - EXPECT_EQ(Status, EFI_SUCCESS); + Status =3D SetSecureBootMode (SecureBootMode); + EXPECT_EQ (Status, EFI_SUCCESS); } =20 //////////////////////////////////////////////////////////////////////////= //// class GetSetupModeTest : public Test { - protected: - MockUefiRuntimeServicesTableLib RtServicesMock; - UINT8 SetupMode; - EFI_STATUS Status; - UINT8 ExpSetupMode; +protected: + MockUefiRuntimeServicesTableLib RtServicesMock; + UINT8 SetupMode; + EFI_STATUS Status; + UINT8 ExpSetupMode; =20 - void SetUp() override { - // Any random magic number can be used for these tests - ExpSetupMode =3D 0xAB; - } + void + SetUp ( + ) override + { + // Any random magic number can be used for these tests + ExpSetupMode =3D 0xAB; + } }; =20 // Test GetSetupMode() API from SecureBootVariableLib to verify the expect= ed // error is returned when the call to gRT->GetVariable() fails. -TEST_F(GetSetupModeTest, GetVarError) { - EXPECT_CALL(RtServicesMock, gRT_GetVariable) - .WillOnce(Return(EFI_INVALID_PARAMETER)); +TEST_F (GetSetupModeTest, GetVarError) { + EXPECT_CALL (RtServicesMock, gRT_GetVariable) + .WillOnce (Return (EFI_INVALID_PARAMETER)); =20 Status =3D GetSetupMode (&SetupMode); - EXPECT_EQ(Status, EFI_INVALID_PARAMETER); + EXPECT_EQ (Status, EFI_INVALID_PARAMETER); } =20 // Test GetSetupMode() API from SecureBootVariableLib to verify the expect= ed // setup mode is returned (and with a success return code) when the mode is // successfully read from the call to gRT->GetVariable(). -TEST_F(GetSetupModeTest, FetchModeFromGetVar) { - EXPECT_CALL(RtServicesMock, - gRT_GetVariable( - Char16StrEq(EFI_SETUP_MODE_NAME), - BufferEq(&gEfiGlobalVariableGuid, sizeof(EFI_GUID)), +TEST_F (GetSetupModeTest, FetchModeFromGetVar) { + EXPECT_CALL ( + RtServicesMock, + gRT_GetVariable ( + Char16StrEq (EFI_SETUP_MODE_NAME), + BufferEq (&gEfiGlobalVariableGuid, sizeof (EFI_GUID)), _, - Pointee(Eq(sizeof(SetupMode))), - NotNull())) - .WillOnce(DoAll( - SetArgPointee<3>(sizeof(ExpSetupMode)), - SetArgBuffer<4>(&ExpSetupMode, sizeof(ExpSetupMode)), - Return(EFI_SUCCESS))); + Pointee (Eq (sizeof (SetupMode))), + NotNull () + ) + ) + .WillOnce ( + DoAll ( + SetArgPointee<3>(sizeof (ExpSetupMode)), + SetArgBuffer<4>(&ExpSetupMode, sizeof (ExpSetupMode)), + Return (EFI_SUCCESS) + ) + ); =20 Status =3D GetSetupMode (&SetupMode); - ASSERT_EQ(Status, EFI_SUCCESS); - EXPECT_EQ(SetupMode, ExpSetupMode); + ASSERT_EQ (Status, EFI_SUCCESS); + EXPECT_EQ (SetupMode, ExpSetupMode); } =20 //////////////////////////////////////////////////////////////////////////= //// class IsSecureBootEnabledTest : public Test { - protected: - MockUefiLib UefiLibMock; - BOOLEAN Enabled; +protected: + MockUefiLib UefiLibMock; + BOOLEAN Enabled; }; =20 // Test IsSecureBootEnabled() API from SecureBootVariableLib to verify FAL= SE // is returned when the call to GetEfiGlobalVariable2() fails. -TEST_F(IsSecureBootEnabledTest, GetVarError) { - EXPECT_CALL(UefiLibMock, GetEfiGlobalVariable2) - .WillOnce(Return(EFI_ABORTED)); +TEST_F (IsSecureBootEnabledTest, GetVarError) { + EXPECT_CALL (UefiLibMock, GetEfiGlobalVariable2) + .WillOnce (Return (EFI_ABORTED)); =20 Enabled =3D IsSecureBootEnabled (); - EXPECT_EQ(Enabled, FALSE); + EXPECT_EQ (Enabled, FALSE); } =20 //////////////////////////////////////////////////////////////////////////= //// class IsSecureBootEnabledAllocTest : public IsSecureBootEnabledTest { - protected: - UINT8 *BootEnabledBuffer; +protected: + UINT8 *BootEnabledBuffer; =20 - void SetUp() override { - BootEnabledBuffer =3D (UINT8*) AllocatePool(1); - ASSERT_NE(BootEnabledBuffer, nullptr); - } + void + SetUp ( + ) override + { + BootEnabledBuffer =3D (UINT8 *)AllocatePool (1); + ASSERT_NE (BootEnabledBuffer, nullptr); + } }; =20 // Test IsSecureBootEnabled() API from SecureBootVariableLib to verify TRUE // is returned when the call to GetEfiGlobalVariable2() is successful and // returns SECURE_BOOT_MODE_ENABLE. -TEST_F(IsSecureBootEnabledAllocTest, IsEnabled) { +TEST_F (IsSecureBootEnabledAllocTest, IsEnabled) { *BootEnabledBuffer =3D SECURE_BOOT_MODE_ENABLE; - EXPECT_CALL(UefiLibMock, - GetEfiGlobalVariable2( - Char16StrEq(EFI_SECURE_BOOT_MODE_NAME), - NotNull(), - _)) - .WillOnce(DoAll( - SetArgBuffer<1>(&BootEnabledBuffer, sizeof(VOID*)), - Return(EFI_SUCCESS))); + EXPECT_CALL ( + UefiLibMock, + GetEfiGlobalVariable2 ( + Char16StrEq (EFI_SECURE_BOOT_MODE_NAME), + NotNull (), + _ + ) + ) + .WillOnce ( + DoAll ( + SetArgBuffer<1>(&BootEnabledBuffer, sizeof (VOID *)), + Return (EFI_SUCCESS) + ) + ); =20 Enabled =3D IsSecureBootEnabled (); - EXPECT_EQ(Enabled, TRUE); + EXPECT_EQ (Enabled, TRUE); } =20 // Test IsSecureBootEnabled() API from SecureBootVariableLib to verify FAL= SE // is returned when the call to GetEfiGlobalVariable2() is successful and // returns SECURE_BOOT_MODE_DISABLE. -TEST_F(IsSecureBootEnabledAllocTest, IsDisabled) { +TEST_F (IsSecureBootEnabledAllocTest, IsDisabled) { *BootEnabledBuffer =3D SECURE_BOOT_MODE_DISABLE; - EXPECT_CALL(UefiLibMock, - GetEfiGlobalVariable2( - Char16StrEq(EFI_SECURE_BOOT_MODE_NAME), - NotNull(), - _)) - .WillOnce(DoAll( - SetArgBuffer<1>(&BootEnabledBuffer, sizeof(VOID*)), - Return(EFI_SUCCESS))); + EXPECT_CALL ( + UefiLibMock, + GetEfiGlobalVariable2 ( + Char16StrEq (EFI_SECURE_BOOT_MODE_NAME), + NotNull (), + _ + ) + ) + .WillOnce ( + DoAll ( + SetArgBuffer<1>(&BootEnabledBuffer, sizeof (VOID *)), + Return (EFI_SUCCESS) + ) + ); =20 Enabled =3D IsSecureBootEnabled (); - EXPECT_EQ(Enabled, FALSE); + EXPECT_EQ (Enabled, FALSE); } =20 -int main(int argc, char* argv[]) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); +int +main ( + int argc, + char *argv[] + ) +{ + testing::InitGoogleTest (&argc, argv); + return RUN_ALL_TESTS (); } diff --git a/SecurityPkg/Test/Mock/Include/GoogleTest/Library/MockPlatformP= KProtectionLib.h b/SecurityPkg/Test/Mock/Include/GoogleTest/Library/MockPla= tformPKProtectionLib.h index 8024f4be2975..04288f2b75a3 100644 --- a/SecurityPkg/Test/Mock/Include/GoogleTest/Library/MockPlatformPKProtec= tionLib.h +++ b/SecurityPkg/Test/Mock/Include/GoogleTest/Library/MockPlatformPKProtec= tionLib.h @@ -11,8 +11,8 @@ #include #include extern "C" { -#include -#include + #include + #include } =20 struct MockPlatformPKProtectionLib { diff --git a/SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtect= ionLib/MockPlatformPKProtectionLib.cpp b/SecurityPkg/Test/Mock/Library/Goog= leTest/MockPlatformPKProtectionLib/MockPlatformPKProtectionLib.cpp index 5ea030f6dfcf..6613d5ed199a 100644 --- a/SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/= MockPlatformPKProtectionLib.cpp +++ b/SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/= MockPlatformPKProtectionLib.cpp @@ -6,6 +6,6 @@ **/ #include =20 -MOCK_INTERFACE_DEFINITION(MockPlatformPKProtectionLib); +MOCK_INTERFACE_DEFINITION (MockPlatformPKProtectionLib); =20 -MOCK_FUNCTION_DEFINITION(MockPlatformPKProtectionLib, DisablePKProtection,= 0, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockPlatformPKProtectionLib, DisablePKProtection= , 0, EFIAPI); --=20 2.41.0.windows.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107670): https://edk2.groups.io/g/devel/message/107670 Mute This Topic: https://groups.io/mt/100655293/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107671+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107671+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627045; cv=none; d=zohomail.com; s=zohoarc; b=Onhy5cCH9l7pLgkjz8zpeC5C/Q/kg1jezAVizGaMQ7MjkYuIWE3gf87HsyhoBtWP49IM7qqnBOTaOa6guV4ZipR7kPszZyTNAytWRBLWZ5DIusPAIJ+lVpn1pnD5jsJ9qmQU29G64WP0rNGFQEGSCPRFSARoEoJiavhiUS2rnr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627045; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=IdmHWKBdA9rjrhx2wfxjJgy21WoX4vqjbvZr/xVWsgU=; b=TpqImOZaJTOD1Rdei/ooL4Qx0B8ZYIT4cYFqbYyuORUM+jutWWF5l5w7x3W4JCGrgXqLpqEhpKRBlpClDt9VGC43YX28ugD5mkJ+YBOlHsQ+ofjVfoGDCAi/DPdEvThudg32Ga2R+TmFosj7pWgkePldY9FJmiingkqEr0MBIr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107671+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1691627045989421.27568475051226; Wed, 9 Aug 2023 17:24:05 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=WJI572GU//yzNzgOU20mvZvgtwJVOWadKHw9k34artY=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627045; v=1; b=JpQEdu3jrFfoxKMcqVrAczytHqP6IG/Aul25NcPAeSIEBl9uAHpxdc+b5ulAL2XpGHqxir3Z OhPdQBMS6Y88xmnlcAzRMBMwPhpK4tpRfjw5A+9Fi7Sc7gsWnbf9Wnh1wDOaatwJDO7loWDoIzW 1EnXY8xpE5VWEShwLsGx9g2Q= X-Received: by 127.0.0.2 with SMTP id QswRYY1788612xveoLklzgUb; Wed, 09 Aug 2023 17:24:05 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.3612.1691616749853079630 for ; Wed, 09 Aug 2023 14:32:29 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id 9D24C20FC4EA for ; Wed, 9 Aug 2023 14:32:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9D24C20FC4EA From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 6/7] UnitTestFrameworkPkg: Apply uncrustify formatting to relevant files Date: Wed, 9 Aug 2023 14:32:25 -0700 Message-ID: <20230809213226.1387-7-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Uu8GekHRdViWpj1BMoY8Cw1Mx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627047039100037 Content-Type: text/plain; charset="utf-8" Apply uncrustify formatting to GoogleTest cpp and header files. CC: Michael D Kinney CC: Michael Kubacki CC: Sean Brogan Signed-off-by: Vivian Nowka-Keane Reviewed-by: Michael D Kinney Reviewed-by: Michael Kubacki --- UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h = | 2 +- UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTest/SampleGoogleT= est.cpp | 76 ++++++++++++-------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h b/UnitTes= tFrameworkPkg/Include/Library/GoogleTestLib.h index c0a3d8e66011..c723b5c23050 100644 --- a/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h +++ b/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h @@ -14,7 +14,7 @@ #include =20 extern "C" { -#include + #include } =20 //////////////////////////////////////////////////////////////////////////= //// diff --git a/UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTest/S= ampleGoogleTest.cpp b/UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoo= gleTest/SampleGoogleTest.cpp index c83e58596a82..94cbf2cf0b3c 100644 --- a/UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTest/SampleGo= ogleTest.cpp +++ b/UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTest/SampleGo= ogleTest.cpp @@ -18,7 +18,7 @@ extern "C" { Sample unit test that verifies the expected result of an unsigned integer addition operation. **/ -TEST(SimpleMathTests, OnePlusOneShouldEqualTwo) { +TEST (SimpleMathTests, OnePlusOneShouldEqualTwo) { UINTN A; UINTN B; UINTN C; @@ -34,11 +34,11 @@ TEST(SimpleMathTests, OnePlusOneShouldEqualTwo) { Sample unit test that verifies that a global BOOLEAN is updatable. **/ class GlobalBooleanVarTests : public ::testing::Test { - public: - BOOLEAN SampleGlobalTestBoolean =3D FALSE; +public: + BOOLEAN SampleGlobalTestBoolean =3D FALSE; }; =20 -TEST_F(GlobalBooleanVarTests, GlobalBooleanShouldBeChangeable) { +TEST_F (GlobalBooleanVarTests, GlobalBooleanShouldBeChangeable) { SampleGlobalTestBoolean =3D TRUE; ASSERT_TRUE (SampleGlobalTestBoolean); =20 @@ -51,37 +51,46 @@ TEST_F(GlobalBooleanVarTests, GlobalBooleanShouldBeChan= geable) { pointer is updatable. **/ class GlobalVarTests : public ::testing::Test { - public: - VOID *SampleGlobalTestPointer =3D NULL; +public: + VOID *SampleGlobalTestPointer =3D NULL; =20 - protected: - void SetUp() override { +protected: + void + SetUp ( + ) override + { ASSERT_EQ ((UINTN)SampleGlobalTestPointer, (UINTN)NULL); } - void TearDown() { + + void + TearDown ( + ) + { SampleGlobalTestPointer =3D NULL; } }; =20 -TEST_F(GlobalVarTests, GlobalPointerShouldBeChangeable) { +TEST_F (GlobalVarTests, GlobalPointerShouldBeChangeable) { SampleGlobalTestPointer =3D (VOID *)-1; ASSERT_EQ ((UINTN)SampleGlobalTestPointer, (UINTN)((VOID *)-1)); } =20 - /** Set PcdDebugPropertyMask for each MacroTestsAssertsEnabledDisabled test **/ class MacroTestsAssertsEnabledDisabled : public testing::TestWithParam { - void SetUp() { - PatchPcdSet8 (PcdDebugPropertyMask, GetParam()); + void + SetUp ( + ) + { + PatchPcdSet8 (PcdDebugPropertyMask, GetParam ()); } }; =20 /** Sample unit test using the ASSERT_TRUE() macro. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertTrue) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertTrue) { UINT64 Result; =20 // @@ -99,7 +108,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertTrue= ) { /** Sample unit test using the ASSERT_FALSE() macro. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertFalse) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertFalse) { UINT64 Result; =20 // @@ -117,7 +126,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertFal= se) { /** Sample unit test using the ASSERT_EQ() macro. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertEqual) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertEqual) { UINT64 Result; =20 // @@ -135,7 +144,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertEqu= al) { /** Sample unit test using the ASSERT_STREQ() macro. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertMemEqual) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertMemEqual) { CHAR8 *String1; CHAR8 *String2; =20 @@ -150,7 +159,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertMem= Equal) { /** Sample unit test using the ASSERT_NE() macro. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertNotEqual) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertNotEqual) { UINT64 Result; =20 // @@ -169,7 +178,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertNot= Equal) { Sample unit test using the ASSERT_TRUE() and ASSERT(FALSE) and EFI_EFFOR() macros to check status **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertNotEfiError) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertNotEfiError) { // // This test passes because the status is not an EFI error. // @@ -184,7 +193,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertNot= EfiError) { /** Sample unit test using the ASSERT_EQ() macro to compare EFI_STATUS value= s. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertStatusEqual) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertStatusEqual) { // // This test passes because the status value are always equal. // @@ -194,7 +203,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertSta= tusEqual) { /** Sample unit test using ASSERT_NE() macro to make sure a pointer is not N= ULL. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertNotNull) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroAssertNotNull) { UINT64 Result; =20 // @@ -206,7 +215,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroAssertNot= Null) { /** Sample unit test using that should not generate any ASSERTs() **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroExpectNoAssertFailure) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroExpectNoAssertFailure) { // // This test passes because it never triggers an ASSERT(). // @@ -222,7 +231,7 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroExpectNoA= ssertFailure) { /** Sample unit test using the ASSERT_DEATH() macro to test expected ASSERT(= )s. **/ -TEST_P(MacroTestsAssertsEnabledDisabled, MacroExpectAssertFailure) { +TEST_P (MacroTestsAssertsEnabledDisabled, MacroExpectAssertFailure) { // // Skip tests that verify an ASSERT() is triggered if ASSERT()s are disa= bled. // @@ -243,21 +252,28 @@ TEST_P(MacroTestsAssertsEnabledDisabled, MacroExpectA= ssertFailure) { ASSERT_DEATH (DecimalToBcd8 (101), ""); } =20 -INSTANTIATE_TEST_SUITE_P(ValidInput, - MacroTestsAssertsEnabledDisabled, - ::testing::Values(PcdGet8 (PcdDebugPropertyMask) = | BIT0, PcdGet8 (PcdDebugPropertyMask) & (~BIT0))); +INSTANTIATE_TEST_SUITE_P ( + ValidInput, + MacroTestsAssertsEnabledDisabled, + ::testing::Values (PcdGet8 (PcdDebugPropertyMask) | BIT0, PcdGet8 (PcdDe= bugPropertyMask) & (~BIT0)) + ); =20 /** Sample unit test using the SCOPED_TRACE() macro for trace messages. **/ -TEST(MacroTestsMessages, MacroTraceMessage) { +TEST (MacroTestsMessages, MacroTraceMessage) { // // Example of logging. // SCOPED_TRACE ("SCOPED_TRACE message\n"); } =20 -int main(int argc, char* argv[]) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); +int +main ( + int argc, + char *argv[] + ) +{ + testing::InitGoogleTest (&argc, argv); + return RUN_ALL_TESTS (); } --=20 2.41.0.windows.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107671): https://edk2.groups.io/g/devel/message/107671 Mute This Topic: https://groups.io/mt/100655294/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Feb 8 04:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107672+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107672+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1691627046; cv=none; d=zohomail.com; s=zohoarc; b=CxkdQCB9wgzf2R/FdCWbCndTEUEQ5mwWMT9TfSy3vZNKWEnxyVvirAuQAWIyrom7lM94BAn/Gabz4Y22FmIayKSfIJGQHXhRmIqODUla4DlZrw67WaYnUTPWQz7jOumPUhTLFwDH46PfLcjcQvdCEugMpquLQjFNTTUXqzVy2us= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691627046; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=2g7f9sO5u9ol2cK36jk7hwianwUxLU4wjN+VqQY30Qw=; b=PcsU6XA9yf33SEYQdZYjjexAk71G7e3jDvnFHBwnYfFYpizUbKmXAaKRReFecspGyOMSKMV4KJfUWjOFdJfhSMtFfoE271jb7rInMFsL4J1XbliRPmeWYenOtWKv46agpomKMzF4pmZ9ySCPg497Of0uaGHcpTl96ZEgwAYWJU4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107672+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1691627046435402.51127793033424; Wed, 9 Aug 2023 17:24:06 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=iA+d5AU48SDcj5Vyg08V8RQhw1Rtc2dzV/Rk3nELv9g=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691627046; v=1; b=qzJe+klGMdmYBm38VuIrb6TAvgatMzgUkqoEJ124q053DFb1PRv9CpIyFlVvxzgYfNCThJq5 2wJMYQkJ8/JoBaiIr5/lozxrYh+G0YWyiTkvePQr8vTNYkYU+rHtOgytwU9iN6BiRie4ywFPZM5 mrHN1W8qwYCrh6suUNKXeM1U= X-Received: by 127.0.0.2 with SMTP id 6dUMYY1788612xpT92JqKipJ; Wed, 09 Aug 2023 17:24:06 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.3576.1691616749975120022 for ; Wed, 09 Aug 2023 14:32:30 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id BA19320FC4EF for ; Wed, 9 Aug 2023 14:32:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BA19320FC4EF From: "VivianNK" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 7/7] .pytool: Undo uncrustify check change Date: Wed, 9 Aug 2023 14:32:26 -0700 Message-ID: <20230809213226.1387-8-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> References: <20230809213226.1387-1-vnowkakeane@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vnowkakeane@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zMfrU9N64zp9faa3V3oruyA1x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1691627047151100039 Content-Type: text/plain; charset="utf-8" Set global audit only to False now that new rules have been applied to all necessary packages. Signed-off-by: Vivian Nowka-Keane --- .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Pl= ugin/UncrustifyCheck/UncrustifyCheck.py index 17f77b48d954..ffc72f2c5918 100644 --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py @@ -530,7 +530,7 @@ class UncrustifyCheck(ICiBuildPlugin): """ Initializes options that influence test case output. """ - self._audit_only_mode =3D True + self._audit_only_mode =3D False self._output_file_diffs =3D True =20 if "AuditOnly" in self._package_config and self._package_config["A= uditOnly"]: --=20 2.41.0.windows.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107672): https://edk2.groups.io/g/devel/message/107672 Mute This Topic: https://groups.io/mt/100655295/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-