diff options
Diffstat (limited to 'ecs/tests')
-rw-r--r-- | ecs/tests/query.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ecs/tests/query.rs b/ecs/tests/query.rs index 0f02bd3..062fd5a 100644 --- a/ecs/tests/query.rs +++ b/ecs/tests/query.rs @@ -36,13 +36,13 @@ struct G; fn setup() { SETUP.call_once_force(|_| { - assert_eq!(A::id().id(), 1); - assert_eq!(B::id().id(), 2); - assert_eq!(C::id().id(), 3); - assert_eq!(D::id().id(), 4); - assert_eq!(E::id().id(), 5); - assert_eq!(F::id().id(), 6); - assert_eq!(G::id().id(), 7); + assert_eq!(A::id().id(), Uid::FIRST_UNIQUE_ID); + assert_eq!(B::id().id(), Uid::FIRST_UNIQUE_ID + 1); + assert_eq!(C::id().id(), Uid::FIRST_UNIQUE_ID + 2); + assert_eq!(D::id().id(), Uid::FIRST_UNIQUE_ID + 3); + assert_eq!(E::id().id(), Uid::FIRST_UNIQUE_ID + 4); + assert_eq!(F::id().id(), Uid::FIRST_UNIQUE_ID + 5); + assert_eq!(G::id().id(), Uid::FIRST_UNIQUE_ID + 6); }); } @@ -210,7 +210,7 @@ fn query_archetype_exists_with_4_comps_diff_to_next_archetype_and_opt_comp() let ent_2_id = world.create_entity((A, B, G)); assert_query_finds_ents( - world.query::<(&A, &Option<E>, &G), ()>(), + world.query::<(&A, Option<&E>, &G), ()>(), vec![ent_1_id, ent_2_id], ); } @@ -249,7 +249,7 @@ fn query_archetype_nonexistant_and_opt_comp() world.create_entity((A, B, C, G, F)); assert_query_finds_ents( - world.query::<(&A, &E, &Option<D>), ()>(), + world.query::<(&A, &E, Option<&D>), ()>(), vec![ent_2_id, ent_3_id], ); } |