mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-06-11 04:35:39 +00:00
add serialization test
This commit is contained in:
parent
a7eb28279e
commit
ba409b6ee2
@ -67,9 +67,8 @@ protected:
|
|||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
TearDownDependencies();
|
TearDownDependencies();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
TEST_F(MovingPlatformComponentTests, MovingPlatformConstructionTest) {
|
void TestSerialization() {
|
||||||
auto* movingPlatformComponent = baseEntity->GetComponent<MovingPlatformComponent>();
|
auto* movingPlatformComponent = baseEntity->GetComponent<MovingPlatformComponent>();
|
||||||
ASSERT_NE(movingPlatformComponent, nullptr);
|
ASSERT_NE(movingPlatformComponent, nullptr);
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
@ -267,4 +266,13 @@ TEST_F(MovingPlatformComponentTests, MovingPlatformConstructionTest) {
|
|||||||
bool hasPlatformSubComponents2;
|
bool hasPlatformSubComponents2;
|
||||||
bitStream.Read(hasPlatformSubComponents2);
|
bitStream.Read(hasPlatformSubComponents2);
|
||||||
ASSERT_FALSE(hasPlatformSubComponents2);
|
ASSERT_FALSE(hasPlatformSubComponents2);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_F(MovingPlatformComponentTests, MovingPlatformConstructionTest) {
|
||||||
|
TestSerialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(MovingPlatformComponentTests, MovingPlatformSerializationTest) {
|
||||||
|
TestSerialization();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user