Re: GoogleTest Compatibility with MdePkg's IndustyStandard header files
On Thu, May 25, 2023 at 6:43 PM Oliver Smith-Denny
No, the idea is that current C code can use the
already-existing-and-standard .operator and .xor, and C++ can use
.operator_ and .xor_ (or the macros, although please no?).
But my idea was to leave this as a Tpm.h hack, not in Base.h (new
headers and structs should take C++ into account).
depending on the test (there exist tests that want to testThis is a hacky solution. Either write things in C++, or don't include
.c in .cpp.
C code is not C++ code. There's a lot of C code that does not and
should not compile in C++.
1) Write the actual functionality code in C++. This is not yet
supported in EDK2 (I'm a proponent of this)
2) Don't make the functions you're testing static, or make them
conditionally static on something
Note: Adding proper, actual C++ code to EDK2 requires some care, but
could result in actual good changes. I don't know how well this would
be received by the community though.
But, that being said, this is an issue we face, so perhapsI think breaking all sorts of users for this sort of "silly" problems
is not a good option here. There's no actual need for this ATM, apart
from "We want to test this silly code in this new Google Test library
that just appeared upstream".
But these are just my 2c of course.