diff options
author | Pedro Falcato <pedro.falcato@gmail.com> | 2023-11-30 22:42:14 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-03 02:37:26 +0000 |
commit | 7182621edc67260a322fa0fb8bb4c8e398d9323e (patch) | |
tree | 38d999af1c4269e4c1232cac6d88286979b44aaa /UnitTestFrameworkPkg | |
parent | c3769e392b9293d8fdd124665f12b08c704e5952 (diff) | |
download | edk2-7182621edc67260a322fa0fb8bb4c8e398d9323e.tar.gz |
UnitTestFrameworkPkg/Readme.md: Remove gtest main() limitation
As of the previous commit, this limitation is no longer a thing.
You can now write gtest unit tests with multiple files and no need for
any hack such as #include.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Reviewed-by: Cc: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'UnitTestFrameworkPkg')
-rw-r--r-- | UnitTestFrameworkPkg/ReadMe.md | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md index 7da6a320a7..d6a3e0c15a 100644 --- a/UnitTestFrameworkPkg/ReadMe.md +++ b/UnitTestFrameworkPkg/ReadMe.md @@ -1096,22 +1096,6 @@ int main(int argc, char* argv[]) { }
```
-However, while GoogleTest does not require test suites or test cases to be
-registered, there is still one rule within EDK II that currently needs to be
-followed. This rule is that all tests for a given GoogleTest application must
-be contained within the same source file that contains the `main()` function
-shown above. These tests can be written directly in the file or a `#include`
-can be used to add them into the file indirectly.
-
-The reason for this is due to EDK II taking the host application INF file and
-first compiling all of its source files into a static library. This static
-library is then linked into the final host application. The problem with this
-method is that only the tests in the object file containing the `main()`
-function are linked into the final host application. This is because the other
-tests are contained in their own object files within the static library and
-they have no symbols in them that the final host application depends on, so
-those object files are not linked into the final host application.
-
### GoogleTest - A Simple Test Case
Below is a sample test case from `SampleGoogleTestHost`.
|