Fix GTest Expect Exit Code Return
Reporter: RobertBColton | Status: closed | Last Modified: July 31, 2019, 10:19:46 pmThe first thing I had to do was get rid of the default parameter on game_end
so that extensions are able to manipulate the game end return value. This circumvents having to update all of the existing tests to ask the gtest extension for an exit code to return or whether there was a failure. It may still be useful to provide that information later though.
I also had to tweak the Win32 and SDL platform's quit to just end the game rather than setting the exit code to 0, since that would preclude an extension being able to effect the game return code.
I tweaked the GTest Makefile in this too because I am tired of having to tweak it every time I want to run the extension on Windows. The package in MSYS2 only provides a dll, no static library, and thus the file extension is necessary for it to build.
Finally, I made the GTest extension set the game exit code to 43 if an expect fails (a non-assert, aka soft assert, failure). This will make it easy to quickly discern hard and soft assertion failures in the test harness.
Codecov Report
Merging #1842 into master will increase coverage by
0.09%
.
The diff coverage is75%
.
@@ Coverage Diff @@
## master #1842 +/- ##
==========================================
+ Coverage 24.89% 24.99% +0.09%
==========================================
Files 177 177
Lines 16743 16776 +33
==========================================
+ Hits 4169 4193 +24
- Misses 12574 12583 +9
Impacted Files | Coverage Δ | |
---|---|---|
ENIGMAsystem/SHELL/Platforms/General/PFmain.cpp | 75.92% <100%> (-4.85%) |
⬇️ |
.../SHELL/Universal_System/Extensions/GTest/GTest.cpp | 71.42% <50%> (-2.26%) |
⬇️ |
...stem/SHELL/Universal_System/Resources/AssetArray.h | 73.46% <0%> (-26.54%) |
⬇️ |
.../SHELL/Universal_System/Resources/fonts_internal.h | 30.76% <0%> (-9.24%) |
⬇️ |
...em/SHELL/Universal_System/Resources/fontstruct.cpp | 0.64% <0%> (-0.54%) |
⬇️ |
...stem/SHELL/Universal_System/Resources/fontinit.cpp | 51.42% <0%> (+0.03%) |
⬆️ |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7fcb1ce...891b052. Read the comment docs.