Google Test is a C++ testing framework that allows you to run automated tests of your code and report the results.
Here is a sample test that generated the output for "GameplayTest.EndRound_ByCall" above:
TEST_F( GameplayTest, EndRound_ByCall ) {
// Start the round
AdvanceGameTime( 1.0f );
gameplay->OnThink();
// Force round end
AdvanceGameTime( 1.0f );
gameplay->EndRound();
// Make sure we are in a round intermission
EXPECT_FALSE( gameplay->IsInRound() );
EXPECT_TRUE( gameplay->IsInRoundIntermission() );
EXPECT_FALSE( gameplay->IsInFinalIntermission() );
}
This test sets up a match as if you just started the server then proceeds to start the first round and then end that round by calling the "EndRound" function. This simulates a call to "GEMPGameRules.EndRound()" from Python.
By doing this I can see if my code contains logic errors that would prevent rounds or matches from ending in various conditions. This allows me to test all my code at once and be sure that what I changed did not break the underlying functionality. THIS IS CRITICAL TO MOVING TO SDK 2013!
Another benefit is that when we go to open source, if I member recommends a code change, I can run it against our tests to make sure they don't break anything.