From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id AF7B3AC0471 for ; Thu, 10 Aug 2023 00:24:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LV806415dMSltSBH6ieLVS/YDMAjTyVGMAmIJbq48c8=; 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=1691627047; v=1; b=rw+l/bguk8O+Ieevqm9RK5WJti1ZfpnmgRj/ZMisG1VIi7dNGRgU9R3+EFk63SL3d5zHvtjw wgtHlqs92TN2J/dmvf4HsV/3mJ9eG4Rx3EmSxu3iqMgjyAJbtvlXsVpfZWlAbjQR9EMgw1MnkP3 o8mIy9tFKWwr7YeFTLg63WJ0= X-Received: by 127.0.0.2 with SMTP id 0xzaYY7687511xVyxieMelA4; Wed, 09 Aug 2023 17:24:07 -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: BfZZ1fqMx9zVikuaDmYdrLwyx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="rw+l/bgu"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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=0D )=0D {=0D - if (*(UINT32*)Right > *(UINT32*)Left) {=0D + if (*(UINT32 *)Right > *(UINT32 *)Left) {=0D return 1;=0D - } else if (*(UINT32*)Right < *(UINT32*)Left) {=0D + } else if (*(UINT32 *)Right < *(UINT32 *)Left) {=0D return -1;=0D }=0D =0D @@ -31,31 +31,36 @@ CompareUint32 ( =0D // Test PerformQuickSort() API from UefiSortLib to verify a UINT32 array=0D // with 9 elements in ascending order is sorted into descending order.=0D -TEST(PerformQuickSortTest, SortUint32AscendingArray_Size9) {=0D - CONST UINT32 ArraySize =3D 9;=0D - UINT32 BuffActual[ArraySize];=0D - UINT32 BuffExpected[ArraySize];=0D +TEST (PerformQuickSortTest, SortUint32AscendingArray_Size9) {=0D + CONST UINT32 ArraySize =3D 9;=0D + UINT32 BuffActual[ArraySize];=0D + UINT32 BuffExpected[ArraySize];=0D =0D for (UINT32 Index =3D 0; Index < ArraySize; Index++) {=0D - BuffActual[Index] =3D Index + 1;=0D + BuffActual[Index] =3D Index + 1;=0D BuffExpected[Index] =3D ArraySize - Index;=0D }=0D =0D - PerformQuickSort (BuffActual, (UINTN)ArraySize, sizeof(UINT32), (SORT_CO= MPARE)CompareUint32);=0D - EXPECT_THAT(BuffActual, ElementsAreArray(BuffExpected, ArraySize));=0D + PerformQuickSort (BuffActual, (UINTN)ArraySize, sizeof (UINT32), (SORT_C= OMPARE)CompareUint32);=0D + EXPECT_THAT (BuffActual, ElementsAreArray (BuffExpected, ArraySize));=0D }=0D =0D // Test StringCompare() API from UefiSortLib to verify the comparison=0D // succeeds when the same buffer is compared with itself.=0D -TEST(StringCompareTest, CompareSameBuffer) {=0D - INTN RetVal;=0D - CONST CHAR16 *Buffer =3D (CHAR16*)L"abcdefg";=0D +TEST (StringCompareTest, CompareSameBuffer) {=0D + INTN RetVal;=0D + CONST CHAR16 *Buffer =3D (CHAR16 *)L"abcdefg";=0D =0D RetVal =3D StringCompare (&Buffer, &Buffer);=0D - EXPECT_EQ(RetVal, 0);=0D + EXPECT_EQ (RetVal, 0);=0D }=0D =0D -int main(int argc, char* argv[]) {=0D - testing::InitGoogleTest(&argc, argv);=0D - return RUN_ALL_TESTS();=0D +int=0D +main (=0D + int argc,=0D + char *argv[]=0D + )=0D +{=0D + testing::InitGoogleTest (&argc, argv);=0D + return RUN_ALL_TESTS ();=0D }=0D 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 =0D #include =0D extern "C" {=0D -#include =0D -#include =0D + #include =0D + #include =0D }=0D =0D struct MockPciHostBridgeLib {=0D 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 @@ =0D #include =0D =0D -MOCK_INTERFACE_DEFINITION(MockPciHostBridgeLib);=0D +MOCK_INTERFACE_DEFINITION (MockPciHostBridgeLib);=0D =0D -MOCK_FUNCTION_DEFINITION(MockPciHostBridgeLib, PciHostBridgeGetRootBridges= , 1, EFIAPI);=0D -MOCK_FUNCTION_DEFINITION(MockPciHostBridgeLib, PciHostBridgeFreeRootBridge= s, 2, EFIAPI);=0D -MOCK_FUNCTION_DEFINITION(MockPciHostBridgeLib, PciHostBridgeResourceConfli= ct, 2, EFIAPI);=0D +MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeGetRootBridge= s, 1, EFIAPI);=0D +MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeFreeRootBridg= es, 2, EFIAPI);=0D +MOCK_FUNCTION_DEFINITION (MockPciHostBridgeLib, PciHostBridgeResourceConfl= ict, 2, EFIAPI);=0D --=20 2.41.0.windows.3 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-