REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2801 Add samples for all UnitTestLib macros including using UT_EXPECT_ASSERT_FAILURE() for positive test cases where an ASSERT() is triggered and detected correctly. Additional test cases are added that disable ASSERT()s and verify that UT_EXPECT_ASSERT_FAILURE() macros are skipped. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
		
			
				
	
	
		
			41 lines
		
	
	
		
			890 B
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			890 B
		
	
	
	
		
			INI
		
	
	
	
	
	
| ## @file
 | |
| # Sample UnitTest built for execution in SMM.
 | |
| #
 | |
| # Copyright (c) Microsoft Corporation.<BR>
 | |
| # SPDX-License-Identifier: BSD-2-Clause-Patent
 | |
| ##
 | |
| 
 | |
| [Defines]
 | |
|   INF_VERSION              = 0x00010006
 | |
|   BASE_NAME                = SampleUnitTestSmm
 | |
|   FILE_GUID                = 389B16DB-F622-424C-9000-9E43C69CBF71
 | |
|   MODULE_TYPE              = DXE_SMM_DRIVER
 | |
|   VERSION_STRING           = 1.0
 | |
|   PI_SPECIFICATION_VERSION = 0x0001000A
 | |
|   ENTRY_POINT              = DxeEntryPoint
 | |
| 
 | |
| #
 | |
| # The following information is for reference only and not required by the build tools.
 | |
| #
 | |
| #  VALID_ARCHITECTURES           = IA32 X64
 | |
| #
 | |
| 
 | |
| [Sources]
 | |
|   SampleUnitTest.c
 | |
| 
 | |
| [Packages]
 | |
|   MdePkg/MdePkg.dec
 | |
| 
 | |
| [LibraryClasses]
 | |
|   UefiDriverEntryPoint
 | |
|   BaseLib
 | |
|   DebugLib
 | |
|   UnitTestLib
 | |
|   PrintLib
 | |
| 
 | |
| [Pcd]
 | |
|   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
 | |
| 
 | |
| [Depex]
 | |
|   gEfiSmmCpuProtocolGuid
 |