Skip to content

Commit

Permalink
fix unit test (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
cart authored Nov 6, 2020
1 parent 5bd6deb commit 26be22e
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions crates/bevy_ecs/hecs/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,25 +961,16 @@ mod tests {
// non existing components even when changing archetype.
world.insert(e4, (A(0), B(0))).unwrap();

let added_a = world
.query::<(Added<A>, Entity)>()
.iter()
.map(|(_, e)| e)
.next();
let added_a = world.query::<(Added<A>, Entity)>().map(|(_, e)| e).next();
assert!(added_a.is_none());

assert_eq!(get_mutated_a(&mut world), vec![e4]);

let added_b = world
.query::<(Added<B>, Entity)>()
.iter()
.map(|(_, e)| e)
.next();
let added_b = world.query::<(Added<B>, Entity)>().map(|(_, e)| e).next();
assert!(added_b.is_some());

let mutated_b = world
.query_mut::<(Mutated<B>, Entity)>()
.iter()
.map(|(_, e)| e)
.next();
assert!(mutated_b.is_none());
Expand Down

0 comments on commit 26be22e

Please sign in to comment.