Skip to content

Commit

Permalink
#268: Add check for type ID in tests for polymorphic types
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Sep 25, 2024
1 parent bcddb46 commit 9bd0905
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unit/test_polymorphic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ void testPolymorphicTypes(int val) {
auto out = checkpoint::deserialize<Base>(std::move(ret));

EXPECT_TRUE(nullptr != out);
EXPECT_EQ(typeid(*task), typeid(*out));
EXPECT_TRUE(nullptr != dynamic_cast<Derived*>(out.get()));
EXPECT_EQ(val, out->getVal());
}

Expand Down

0 comments on commit 9bd0905

Please sign in to comment.