mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
fix unit test (#802)
This commit is contained in:
parent
5bd6deb974
commit
26be22e73c
1 changed files with 2 additions and 11 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue