From nobody Mon Feb 9 15:10:07 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-