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 5AF92780091 for ; Wed, 16 Aug 2023 21:15:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=wQgIepRaEH11zXnzsSh4cbXJoEnK12EckAbAt3FqcVI=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Cc: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=1692220528; v=1; b=K9dDfhvDiV6Ul75qmA+d4+Jy/Fu04GbvC9u+oJteuY1l/x6MhD2I8sK56K8iYQcHXKtwinMF B2U7H1aoCZ5z67XiDFQhzDb0CWEXZB1hqhFsumO8ab9YfgUPFIUS29bsSzLjx7Az7LL3lUGKzyt +WMd3uOxWbS92xosQ+pfkPEk= X-Received: by 127.0.0.2 with SMTP id NC36YY7687511xjNlcwpvuwy; Wed, 16 Aug 2023 14:15:28 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.172577.1692220525565723579 for ; Wed, 16 Aug 2023 14:15:25 -0700 X-Received: from vivian-P520.redmond.corp.microsoft.com (unknown [131.107.1.251]) by linux.microsoft.com (Postfix) with ESMTPSA id 4507A211F7A3; Wed, 16 Aug 2023 14:15:25 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4507A211F7A3 From: "VivianNK" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH v2 3/7] MdeModulePkg: Apply uncrustify formatting to relevant files. Date: Wed, 16 Aug 2023 14:15:18 -0700 Message-ID: <20230816211523.12-4-vnowkakeane@linux.microsoft.com> In-Reply-To: <20230816211523.12-1-vnowkakeane@linux.microsoft.com> References: <20230816211523.12-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: EvOdYrRUS4QFeeUEB2AhxufSx7686176AA= 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=K9dDfhvD; 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 (#107812): https://edk2.groups.io/g/devel/message/107812 Mute This Topic: https://groups.io/mt/100788668/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-