Skip to content

Commit

Permalink
Add test for builder guard entity
Browse files Browse the repository at this point in the history
Test constructing a more complex entity with an attachment (hammer attached to
a joint on the back; currently shows on floor in front of feet due to lack of
parsing of joint information).
  • Loading branch information
Matthew Mott committed Feb 10, 2021
1 parent 0ce5666 commit aaf5134
Show file tree
Hide file tree
Showing 2 changed files with 1,305 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,14 @@ TEST_F(EntityTest, AttachedLightMovesWithEntity)
EXPECT_EQ(rLight->lightAABB().origin, NEW_ORIGIN + EXPECTED_OFFSET);
}

TEST_F(EntityTest, CreateAIEntity)
{
auto guard = createByClassName("atdm:ai_builder_guard");
ASSERT_TRUE(guard);

// Guard should have a hammer attachment
auto attachments = getAttachments(guard);
EXPECT_EQ(attachments.size(), 1);
}

}
Loading

0 comments on commit aaf5134

Please sign in to comment.