<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/UnitTestFrameworkPkg/Include, branch dependabot/github_actions/actions/setup-python-7</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-7</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>UnitTestFrameworkPkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T19:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=59f58197ddec8213b442732391e09cd37126bd8c'/>
<id>urn:sha1:59f58197ddec8213b442732391e09cd37126bd8c</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards
with `#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg/Include/Library: Remove _MSC_VER workaround</title>
<updated>2025-12-24T03:36:31+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-12-20T00:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e6fa2e32689bd6b0de5908da89a3cfd31c806345'/>
<id>urn:sha1:e6fa2e32689bd6b0de5908da89a3cfd31c806345</id>
<content type='text'>
Remove workaround to define _MSC_VER when it is not defined
when building with clang on Windows. This workaround was
required when CLANGPDB undefined _MSC_VER in tools_def.txt.

With -U _MSC_VER removed from tools_def.txt, this workaround
for host-based unit test builds is no longer required.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg/Include: Update GoogleTestLib for CLANG</title>
<updated>2025-09-28T23:38:21+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-09-19T21:03:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=81a7efddd508e78b867d7efa1333564a8a32725f'/>
<id>urn:sha1:81a7efddd508e78b867d7efa1333564a8a32725f</id>
<content type='text'>
Update GoogleTestLib.h to support Windows/CLANGPDB build.
When using Windows/CLANGPDB, _MSC_VER is not defined. If
it is not defined, then set to 1900 for Visual Studio 2015
or newer compatibility when using windows include files for
host based unit test application builds. If _MSC_VER is not
set, then those application fail to build.

Also address a Windows/CLANG issue when ASAN is enabled
by providing an alternate implementation of the
EXPECT_THROW_MESSAGE() and ASSERT_THROW_MESSAGE() macros.
Without this alternate implementation, an exception is
generated due to the description of the ASSERT() condition
being NULL.

Update all implementations of EXPECT_THROW_MESSAGE() and
ASSERT_THROW_MESSAGE() to support parameters to the
statement executed to return values.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg/GoogleTestLib: Enhance unit test NULL checks</title>
<updated>2025-06-24T19:32:41+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2025-06-19T00:58:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b4e5860fd5f722cc849265f1fa4ea20b4071fa1d'/>
<id>urn:sha1:b4e5860fd5f722cc849265f1fa4ea20b4071fa1d</id>
<content type='text'>
gtest.h uses standard includes that define NULL to __null. This
is different that the C++ standard that uses nullptr. Redefine
NULL in GoogleTestLib.h to use C++ form of nullptr. This allows
NULL to be used in checks and mocks without explicit typecasts.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg/MemoryAllocationLibPosix: Add allocate below address</title>
<updated>2025-01-21T05:02:38+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-11-25T19:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e78fb8a366fcd39329f86ce5a095d88d9be8dcb6'/>
<id>urn:sha1:e78fb8a366fcd39329f86ce5a095d88d9be8dcb6</id>
<content type='text'>
Add HostMemoryAllocationBelowAddressLib class and implementation that
uses OS specific services to perform pool and page allocations below
a specified address in a host based unit test application execution
environment. This library class is only required for mocking buffers
that are assumed to be below a specific address by code under test.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Expand host-based exception handling and gcov</title>
<updated>2024-02-14T02:37:16+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2024-02-03T01:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=81b69f306fe801546786186e1e5ae5f79a2fde97'/>
<id>urn:sha1:81b69f306fe801546786186e1e5ae5f79a2fde97</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683

Update MSFT CC_FLAGS for host-based unit tests to use /EHs
instead of /EHsc to support building C functions with SEH
(Structured Exception Handling) enabled.  This is required to
build UnitTestDebugAssertLibHost.inf.

Update GCC CC_FLAGS for host-based unit tests to use -fexceptions
to support catching exceptions.

Update GoogleTestLib.h to include Throws() APIs that enable
unit tests to use EXPECT_THAT() to check for expected ASSERT()
conditions for a specific ASSERT() expression.

Update GCC CC_FLAGS to add --coverage for host-based builds
for all GCC tool chains.

Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Apply uncrustify formatting to relevant files</title>
<updated>2023-10-27T00:50:49+00:00</updated>
<author>
<name>Vivian Nowka-Keane</name>
<email>vnowkakeane@linux.microsoft.com</email>
</author>
<published>2023-08-16T21:15:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1e27258a89647cdb79721062baad1903b29cd023'/>
<id>urn:sha1:1e27258a89647cdb79721062baad1903b29cd023</id>
<content type='text'>
Apply uncrustify formatting to GoogleTest cpp and header files.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Vivian Nowka-Keane &lt;vnowkakeane@linux.microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg:  Add gmock support to GoogleTestLib</title>
<updated>2023-04-10T05:59:02+00:00</updated>
<author>
<name>Chris Johnson</name>
<email>chris.n.johnson@intel.com</email>
</author>
<published>2023-03-24T23:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d0252b8fc1fe8b6489a4d0a25c29a5d3eaa95228'/>
<id>urn:sha1:d0252b8fc1fe8b6489a4d0a25c29a5d3eaa95228</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389

* Add gmock support to GoogleTestLib
* Add FunctionMockLib library class and library instance
* Add GoogleTest extension to GoogleTestLib.h for CHAR16 type
* Add GoogleTest extension to GoogleTestLib.h for buffer types
* HOST_APPLICATION only supports IA32/X64

Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Chris Johnson &lt;chris.n.johnson@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Add subhook submodule required for gmock</title>
<updated>2023-04-10T05:59:02+00:00</updated>
<author>
<name>Chris Johnson</name>
<email>chris.n.johnson@intel.com</email>
</author>
<published>2022-12-21T19:56:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0c6d851d258bac2df1e21e2670e8baca1bb37771'/>
<id>urn:sha1:0c6d851d258bac2df1e21e2670e8baca1bb37771</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389

Add subhook submodule that is required to hook internal functions
when using gmock.

    https://github.com/Zeex/subhook

Add SubhookLib library class and SubhookLib library instance.
Include the SUBHOOK_STATIC define in the SubhookLib INF file so
it builds as a static library. Also include the SUBHOOK_STATIC
define in SubhookLib.h so all modules using SubhookLib properly
link SubhookLib as a static library.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Signed-off-by: Chris Johnson &lt;chris.n.johnson@intel.com&gt;
Reviewed-by: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Reviewed-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>UnitTestFrameworkPkg: Modify APIs in UnitTestPersistenceLib</title>
<updated>2022-12-14T13:34:33+00:00</updated>
<author>
<name>Liu, Zhiguang</name>
<email>Zhiguang.Liu@intel.com</email>
</author>
<published>2022-12-06T05:25:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1cd902f1f468500eac6c90a13cbf49a5db4ef32e'/>
<id>urn:sha1:1cd902f1f468500eac6c90a13cbf49a5db4ef32e</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4183

UnitTestPersistenceLib now consumes private struct definition.
Modify APIs in UnitTestPersistenceLib to make it easy to become
a public library.

Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
</content>
</entry>
</feed>
