Fix failing component tests and add missing component tests with submodule initialization

Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-01 16:00:35 +00:00
parent d3b5941458
commit 316e0bc47e
8 changed files with 232 additions and 219 deletions

View File

@@ -44,17 +44,21 @@ TEST_F(AchievementVendorComponentTest, Serialize) {
TEST_F(AchievementVendorComponentTest, SerializeRegularUpdate) {
Entity testEntity(15, info);
AchievementVendorComponent achievementVendorComponent(&testEntity);
// Reset dirty flag by doing initial serialization
RakNet::BitStream initStream;
achievementVendorComponent.Serialize(initStream, true);
// Do a second regular serialization to clear the dirty flag
RakNet::BitStream clearStream;
achievementVendorComponent.Serialize(clearStream, false);
// Test regular update with no changes
RakNet::BitStream bitStream;
achievementVendorComponent.Serialize(bitStream, false);
bitStream.ResetReadPointer();
bool hasVendorInfo;
ASSERT_TRUE(bitStream.Read(hasVendorInfo));
EXPECT_FALSE(hasVendorInfo); // No dirty flags, so no data