MdeModulePkg/UefiSortLib:Add UefiSortLib unit test

Adding two unit test case for UefiSortLib. One is a test on
sorting an array of UINT32 by using PerformQuickSort, another
is a test on comparing the same buffer by using StringCompare.
Add 'main' function name to ECC exception list to avoid ECC
error.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Wenyi Xie
2021-08-11 14:35:39 +08:00
committed by mergify[bot]
parent a776bbabd9
commit ac826886c9
4 changed files with 246 additions and 0 deletions

View File

@ -0,0 +1,32 @@
## @file
# This is a unit test for the UefiSortLib.
#
# Copyright (C) Huawei Technologies Co., Ltd. All rights reserved
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 0x00010017
BASE_NAME = UefiSortLibUnitTest
FILE_GUID = 271337A3-0D79-BA3E-BC03-714E518E3B1B
VERSION_STRING = 1.0
MODULE_TYPE = HOST_APPLICATION
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
UefiSortLibUnitTest.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
[LibraryClasses]
UnitTestLib
DebugLib
UefiSortLib