Skip to content

Commit

Permalink
fix in unit-test, behavior slightly changed
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Nov 16, 2024
1 parent f55b4e6 commit e4c9ed6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/TestPhysicsContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ TEST(PhysicsContext, simulation)
obj->transform.translation.y = i++ * 5.f;
scene->add_object(obj);
scene->physics_context().set_callbacks(obj->id(), callbacks);

// will be added after an update
EXPECT_FALSE(scene->physics_context().contains(obj->id()));
}

// next update will pick up newly added objects
scene->update(0.f);

for(const auto &obj: objects)
{
// will be added after an update
EXPECT_TRUE(scene->physics_context().contains(obj->id()));
}

Expand Down

0 comments on commit e4c9ed6

Please sign in to comment.