Implement GTest and change windows output path

Implement GTest as a testing infrastructure.
Make windows output binaries to the build folder instead of the release type folder (potentially issue further down the line)
Add a simple unit test for DestroyableComponent
This commit is contained in:
David Markowitz
2022-11-07 00:12:35 -08:00
committed by GitHub
parent 9c58ea5c41
commit 1464762bcd
30 changed files with 763 additions and 325 deletions

View File

@@ -138,25 +138,17 @@ void DestroyableComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsIn
if (m_IsSmashable) {
outBitStream->Write(m_HasBricks);
if (m_ExplodeFactor != 1.0f) {
outBitStream->Write1();
outBitStream->Write(m_ExplodeFactor);
} else {
outBitStream->Write0();
}
outBitStream->Write(m_ExplodeFactor != 1.0f);
if (m_ExplodeFactor != 1.0f) outBitStream->Write(m_ExplodeFactor);
}
}
m_DirtyHealth = false;
}
outBitStream->Write(m_DirtyThreatList || bIsInitialUpdate);
if (m_DirtyThreatList || bIsInitialUpdate) {
outBitStream->Write1();
outBitStream->Write(m_HasThreats);
m_DirtyThreatList = false;
} else {
outBitStream->Write0();
}
}
@@ -438,7 +430,6 @@ void DestroyableComponent::AddEnemyFaction(int32_t factionID) {
void DestroyableComponent::SetIsSmashable(bool value) {
m_DirtyHealth = true;
m_IsSmashable = value;
//m_HasBricks = value;
}
void DestroyableComponent::SetAttacksToBlock(const uint32_t value) {