diff --git a/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h b/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h index b8405cee8e..951bbb8102 100644 --- a/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h +++ b/UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h @@ -13,6 +13,15 @@ #include #include +// +// For all use of GoogleTestLib, make sure NULL is defined to nullptr to +// support matching any unit test pointer value to NULL. +// +#ifdef NULL + #undef NULL +#define NULL nullptr +#endif + using ::testing::Throws; using ::testing::ThrowsMessage; using ::testing::HasSubstr;